1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Serga [27]
4 years ago
7

a triangle is defined by the three vertices. write the following functions of the triangle class assume that the point class has

already been written for you you may add helper functions as needed
Engineering
1 answer:
Fofino [41]4 years ago
3 0

Answer:

The triangle() function is an inbuilt function in p5.js which is used to draw a triangle in a plane. This function accepts three vertices of triangle.

Syntax:

triangle(x1, y1, x2, y2, x3, y3)

Below programs illustrates the triangle() function in p5.js:

function setup() {  

   createCanvas(400, 400);  

}  

 

function draw() {  

   background(220);  

   fill('lightgreen');  

 

   // A triangle at (100, 250), (250, 170) and (330, 300)    

   triangle(100, 250, 250, 170, 330, 300);  

}  

You might be interested in
Technician A says you should place the air ratchet setting to
Bas_tet [7]
I think it’s b sry if I’m wrong tho
6 0
3 years ago
For this assignment, you will write a program to determine the time and date corresponding to an elapsed number of seconds since
Karolina [17]

A Python program should be written to produce output that corresponds to the given hour, minute, second, day of the month, month's name, year, and day of the week's name.

present_year=2016

present_month="January"

present_date="1"

present_day="Friday"

present_hour=0

present_minute=0

present_second=0

input<-from user(seconds)//taking imput from the user using Python program

   total_seconds=input

   //checking with seconds

   if(total_seconds<60)

       present_second+=total_seconds

   else

       total_minutes=total_seconds/60

       remaining_seconds=total_seconds-total_minutes*60

       present_second+=remaining_seconds

   //checking with minutes

   if(total_minutes<60)

       present_minute+=total_minutes

   else

       total_hours=total_minutes/60

       remaining_minutes=total_minutes-total_hours*60

       present_minute+=remaining_minutes

   //checklng with hours

   if(total_hours<24)

       present_hour+=total_hours

   else

       total_days=total_hours/24

       remaining_hours=total_hours-total_days*24

       present_hour+=remaining_hours

   //checking with days

   total_weeks=total_days/7

   remaining_day=total_days-total_weeks*7

   switch(remaining_day)

       case 1:

           present_day="Friday"

       case 2:

           present_day="Saturday"

       case 3:

           present_day="Sundayday"

       case 4:

           present_day="Monday"

       case 5:

           present_day="Tuesday"

       case 6:

           present_day="Wedday"

       case 7:

           present_day="Thursday"

   //checking with years    

   if(total_days>366)

       while(total_days)

           if(present_year%4==0)

               total_days-=366

               present_year+=1

           if(present_year%4!=4)

               total_days-=365

               present_year+=1

           if(present_year%4!=0&&total_days<365)

               break;

           if(present_year%4==0&&total_days<366)

               break;

   //checking with months and date

   if(total_days<=366)

       while(total_days)

           if(present_month="January")

               present_date++

               total_days--

               if(present_date==31)

                   present_month="February"

                   present_date=0

           if(present_month="February")

               present_date++

               total_days--

               if(present_date==28&&present_year%4!=0)

                   present_month="March"

                   present_date=0

               if(present_date==29&&present_year%4==0)

                   present_month="March"

                   present_date=0

           if(present_month="March")

               present_date++

               total_days--

               if(present_date==31)

                   present_month="April"

                   present_date=0        

           if(present_month="April")

               present_date++

               total_days--

               if(present_date==30)

                   present_month="May"

                   present_date=0        

           if(present_month="May")

               present_date++

               total_days--

               if(present_date==31)

                   present_month="June"

                   present_date=0        

           if(present_month="June")

               present_date++

               total_days--

               if(present_date==30)

                   present_month="July"

                   present_date=0    

           if(present_month="July")

               present_date++

               total_days--

               if(present_date==31)

                   present_month="August"

                   present_date=0    

           if(present_month="August")

               present_date++

               total_days--

               if(present_date==31)

                   present_month="September"

                   present_date=0        

           if(present_month="September")

               present_date++

               total_days--

               if(present_date==30)

                   present_month="October"

                   present_date=0    

           if(present_month="October")

               present_date++

               total_days--

               if(present_date==31)

                   present_month="November"

                   present_date=0    

           if(present_month="November")

               present_date++

               total_days--

               if(present_date==30)

                   present_month="December"

                   present_date=0

           if(present_month="December")

               present_date++

               total_days--

               if(present_date==31)

                   present_month="January"

                   present_date=0

//printing present time

print present_hour:present_minute:present_second present_date present_month present_year present_day          

Learn more about Python program here:

brainly.com/question/28691290

#SPJ4          

3 0
2 years ago
You have an ac voltage of 10 sin(60t). Design a full wave bridge rectifier which will give you an output voltage that varies a m
Masteriza [31]

As there are 10 V, for Vp1, that is the peak-voltage of the source:

Vp1=10*\sqrt{2}=14.14 V

Then, transformer's theory says that the relation of transformations is:

V1/V2=a

Where V1 is the voltage in the primary and V2 in the secondary.

V1=14.14 V

V2=8.55 V

a=1.65

Then, with the 8.5 V, we find the real peak-voltage, taking in account that in the diodes we have a drop of 0.7 V each, so:

8.5 -1.4=7.1 V

And this will be called VpL

Now we proceed to calculate the mean voltage:

V_{mean}=VpL-(\frac{Vr}{2} )

Where Vr is the ripple voltage, we asume that is 1 V

So, Vmean = 6.6 V

Then we have

Vmean/R= I mean

We have that R=1000 Ohm

Imedia=6.6 V/1000 Ohm

Imedia=6.6 mAmps

Finally, we can calculate the capacitor:

C=Q/Vr

C=Imean/(Vr*2f)

Where f is 60Hz

C=6.6mA/(1V*120)

C=5.5 uFarads

Therefore:

C=5.5 uFarads that works at 12 V

6 0
3 years ago
Supón que tienes que calcular el centro de gravedad de una pieza
Anton [14]

Answer:huh?

Explanation:

4 0
4 years ago
Coastal regions are often affected by nearby ocean currents. The map shows how different ocean currents affect the United States
Effectus [21]

Effect of Ocean currents on the Coastal regions are described below.

Explanation:

1.Ocean currents effects the temperature of the region they travel through. Warm currents increase the temperature of the coasts along which they move. Sea breezes that blow over warm currents get warmed in turn and absorb moisture. Then they carry the warmth and moisture to neighboring coastal areas.

2.When land borders the ocean, the currents of the ocean warm or cool it, depending on the nature of the particular current that flows by that land. In cases where a warm current flows along a particular coast, that coastal area will generally be warmer than it would otherwise be if it were landlocked.

3.They produce high and low tides along coastal regions.They move vertically pushing warm water and nutrients to the surface along coastal regions.

4.The circumpolar current merges the waters of the Atlantic, Indian, and Pacific Oceans and carries up to 150 times the volume of water flowing in all of the world's rivers.

5 0
4 years ago
Other questions:
  • The motor draws in the cord at B with an acceleration of aB = 2 m/s2 . When sA = 1.5 m , vB = 6.2 m/s .
    9·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    6·1 answer
  • The Energy Losses Associated with Valves and Fittings: a)- are generally associated with a K factor b)- are generally associated
    10·1 answer
  • At steady state, air at 200 kPa, 330 K, and mass flow rate of 0.1 kg/s enters an insulated duct having differing inlet and exit
    13·1 answer
  • High strength steels are being used to reduce weight on cars. Explain why using a high strength steel would allow you to reduce
    6·1 answer
  • : THE NEXT BIG THING In this lesson, you learned about two revolutionary new ideas that have engineers hard at work. There are m
    13·1 answer
  • Examples of reciprocating motion in daily life
    14·1 answer
  • The two basic categories of electrical switches are manual and ??
    10·2 answers
  • Gawain 2 talasalitaan
    11·1 answer
  • Question 5 of 10
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!