10x-1=35 is equal to 10x-1+1=35+1, or 10x=36
10x=36 is equal to 10x/10=36/10, or
x=3.6
it equals x1 it equals x1
#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(); }
use the formula y-y1=m(x-x1)
It is linear. The highest power is 1 (x = x1, y = y1) so it is linear.
Well, the equation for slope between two points would be (y1-y2)/(x1-x2). suppose you switched up the x and y values: (y2-y1)/(x2-x1). this equation would still work because the x2 and y2 values are proportional and the x1 and y1 values are preportional. But say you switched up the equation to look like this: (y1-y2)/(x2-x1). neither the x1 and y1 values nor the x2 and y2 values are no longer proportional. using that equation will get you the wrong slope. So overall review:1.) GOOD (y1-y2)/(x1-x2)2.) GOOD (y2-y1)/(x2-x1)3.) BAD (y1-y2)/(x2-x1)Lets try it out with actual points.x1 y1 x2 y2(10,20) (5,10)1.) GOOD (20-10)/(10-5)= (10)/(5)= 22.) GOOD (10-20)/(5-10)= (-10)/(-5)= 23.) BAD (20-10)/(5-10)= (10)/(-5)= -2remember! -a negative number divided by a negative number is a positive number
3
i think its pretty much the same thing because matrix X1 X2 IS ACTUALLY X1 X2
(y-y1)=(y2-y1/x2-x1)(x-x1)
if sqrt(x) + 8 = 0, then: x1/2+8 = 0 x1/2 = -8 (x1/2)2 = (-8)2 x = 64 √x + 8 = 0 is a contradiction equation, because the equivalent equation √x = -8 is not a true statement, because √x = |x| = positive. So that, - √x + 8 = 0 is true for x = 64.
The equation for the slope between the points A = (x1, y1) and B = (x2, y2) = (y2 - y1)/(x2 - x1), provided x1 is different from x2. If x1 and x2 are the same then the slope is not defined.
(y-y1)=m(x-x1) OR we can write it y=m(x-x1)+y1
The slope between two points, (x1, y1) and (x2, y2) is: (y1 - y2) / (x1 - x2)