If you mean: (y2-y1)/(x2-x1) and (y1-y2)/(x1-x2) then either works out the same.
Each element is the mean of the corresponding elements. Thus, the mean of (x1, y1) and ( x2, y2) is [( x1 + x2)/2, (y1 + y2)/2]
There are many calculations that could be done: =SUM(Y1:Y10) =AVERAGE(Y1:Y10) =MAX(Y1:Y10) =MIN(Y1:Y10) =COUNT(Y1:Y10)
If you mean: 3x-y = 1 then it is a straight line equation
5x-y1 = 4
Tangent(theta) is sine over cosine, or y over x. x is 120. Theta is 32 and 37. y1 is height of cliff, and y2 is height of cliff plus flagpole.Tan(32) = y1 / 120, so y1 = 120 tan(32) = 75.Tan(37) = y2 / 120, so y2 = 120 tan(37) = 90.Height of flagpole is y2 - y1 = 90 - 75 = 15.All results rounded to nearest integer.
#include<stdio.h> #include<graphics.h> #include<math.h> #include<conio.h> #include<dos.h> #include<alloc.h> #include<stdlib.h> #define RAD 3.141592/180 class fig { private: int x1,x2,y1,y2,xinc,yinc; public: void car() { xinc=10;yinc=10; x1=y1=10; x2=x1+90;y2=y1+35; int poly[]={x1+5,y1+10,x1+15,y1+10,x1+20,y1,x1+50,y1,x1+60,y1+10,x1+90,y1+17,x1+90,y1+20,x1+5,y1+20,x1+5,y1+10}; setfillstyle(SOLID_FILL,LIGHTGRAY); setlinestyle(SOLID_LINE,1,2); setcolor(4); drawpoly(9,poly); line(x1+15,y1+10,x1+60,y1+10); line(x1+20,y1+10,x1+20,y1); line(x1+35,y1+10,x1+35,y1); line(x1+50,y1+10,x1+50,y1); floodfill(x1+18,y1+8,4); floodfill(x1+28,y1+8,4); floodfill(x1+36,y1+8,4); floodfill(x1+52,y1+8,4); setfillstyle(SOLID_FILL,4); floodfill(x1+18,y1+12,4); setfillstyle(SOLID_FILL,BLUE); bar(x1+5,y1+20,x1+90,y1+25); setcolor(DARKGRAY); circle(x1+20,y1+25,8); circle(x1+20,y1+25,6); setfillstyle(1,8); floodfill(x1+21,y1+25,8); circle(x1+70,y1+25,8); circle(x1+70,y1+25,6); floodfill(x1+71,y1+25,8); int size=imagesize(x1,y1,x2,y2); void far *buf=farmalloc(size); getimage(x1,y1,x2,y2,buf); while(!kbhit()) { putimage(x1,y1,buf,XOR_PUT); x1+=xinc;x2+=xinc; if(x2<(getmaxx()-10)) putimage(x1,y1,buf,COPY_PUT); else { cleardevice(); x1=10;x2=x1+90; y1+=yinc;y2+=yinc; if(y2<(getmaxy()-10)) { putimage(x1,y1,buf,COPY_PUT); } else {y1=10;y2=y1+35;} } delay(200); } farfree(buf); getch(); } } } } void main() { int gd=DETECT,gm; initgraph(&gd,&gm,"d:\\cplus"); fig f; f.car(); cleardevice(); closegraph(); }
Line (x1, y1, x2, y1); Line (x2, y1, x2, y2); Line (x2, y2, x1, y2); Line (x1, y2, x1, y1);
{3x +y =1 {x+y= -3
if we take the (x1,y1),(x2,y2) as coordinates the formula was (x-x1)/(x2-x1)=(y-y1)/(y2-y1)
You can use Pythagoras to solve this to get the co-ordinates. from Pythagoras we have a^2 + b^2 = c^2 For this a and b will be the x and y distance and c the distance between the 2 points so we get (7-2) ^2 + (8-y1)^2 = 13^2 So we need so solve this to get a correct solution which is (8-y1)^2 = 144 so 8 - y1 = + or - 12 so y1 = -4 or y1 = 20
First substitute the coordinates of (x1, y1) into the equation, then simplify the equation so it has y in terms of x. y - y1 = m(x - x1) y - y1 = mx - mx1 y = mx - mx1 + y1 y = mx + (y1 - mx1) y = mx + (C)