answersLogoWhite

0

Int x2 - 3 dx

User Avatar

Anonymous

15y ago
Updated: 12/11/2022

-1

User Avatar

Shanel Weimann

Lvl 10
4y ago

Still curious? Ask our experts.

Chat with our AI personalities

BeauBeau
You're doing better than you think!
Chat with Beau
ViviVivi
Your ride-or-die bestie who's seen you through every high and low.
Chat with Vivi
ReneRene
Change my mind. I dare you.
Chat with Rene
More answers

Assuming that x2 is meant to be x^2, Int x^2 - 3= (x^3)/3 - 3x

User Avatar

Wiki User

15y ago
User Avatar

Add your answer:

Earn +20 pts
Q: Int x2 - 3 dx
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Ddl algorithm of line generation in c?

#include<stdio.h> #include<conio.h> #include<graphics.h> #include<ctype.h> #include<math.h> #include<stdlib.h> void draw(int x1,int y1,int x2,int y2); void main() { int x1,y1,x2,y2; int gdriver=DETECT,gmode,gerror; initgraph(&gdriver,&gmode,"c:\\tc\\bgi:"); printf("\n Enter the x and y value for starting point:\n"); scanf("%d%d",&x1,&y1); printf("\n Enter the x and y value for ending point:\n"); scanf("%d%d",&x2,&y2); printf("\n The Line is shown below: \n"); draw(x1,y1,x2,y2); getch(); } void draw(int x1,int y1,int x2,int y2) { float x,y,xinc,yinc,dx,dy; int k; int step; dx=x2-x1; dy=y2-y1; if(abs(dx)>abs(dy)) step=abs(dx); else step=abs(dy); xinc=dx/step; yinc=dy/step; x=x1; y=y1; putpixel(x,y,1); for(k=1;k<=step;k++) { x=x+xinc; y=y+yinc; putpixel(x,y,2); } }


Write a program to draw a polygon using dda algorithm in c language?

# include <graphics.h> # include <math.h> # include <conio.h> # include <iostream.h> void DDALine(int x1,int y1,int x2,int y2,int iColor); void main() { int gDriver=DETECT,gMode; int x1,x2,y1,y2,iColor; initgraph(&gDriver,&gMode,"c:\\tc\\bgi"); cleardevice(); cout<<endl<<"Enter x1 : "; cin>>x1; cout<<"Enter y1 : "; cin>>y1; cout<<endl<<"Enter x2 : "; cin>>x2; cout<<"Enter y2 : "; cin>>y2; cout<<endl<<"Enter COLOR : "; cin>>iColor; cleardevice(); DDALine(320,1,320,480,12); DDALine(1,240,640,240,12); circle(320,240,2); DDALine(320+x1,240-y1,320+x2,240-y2,iColor%16); getch(); } void DDALine(int x1,int y1,int x2,int y2,int iColor) { float dX,dY,iSteps; float xInc,yInc,iCount,x,y; dX = x1 - x2; dY = y1 - y2; if (fabs(dX) > fabs(dY)) { iSteps = fabs(dX); } else { iSteps = fabs(dY); } xInc = dX/iSteps; yInc = dY/iSteps; x = x1; y = y1; circle(x,y,1); for (iCount=1; iCount<=iSteps; iCount++) { putpixel(floor(x),floor(y),iColor); x -= xInc; y -= yInc; } circle(x,y,1); return; }


What is the code in c plus plus for line drawing algorithm using OpenGL?

Here is the C code for DDA line drawing... #include<stdio.h> #include<conio.h> #include<graphics.h> #include<math.h> void main() { int gd, gm; float x, y, dx, dy, len; int x1, y1, x2, y2, i; detectgraph(&gd, &gm); initgraph(&gd, &gm,""); printf("\n Enter the coordinates of line : "); scanf("%d %d %d %d", &x1, &y1, &x2, &y2); dx = abs(x2-x1); dy = abs(y2-y1); if (dx >= dy) len = dx; else len = dy; dx = (x2-x1)/len; dy = (y2-y1)/len; x = x1 + 0.5; y = y1 + 0.5; i = 1; while (i <= len) { putpixel(x, y, 6); x = x+dx; y = y+dy; i++; } getch(); } -Suraj.


What is the Advantages of bresenham's circle drawing algorithm?

Let (xc,yc) be the centre of the circle Let r be the radius of the circle Let d be 3-2*r (d for decision) Let x be 0 Let y be r Repeat while x is less than y: Increment x If d is less than zero Let d be d + ( 4 * x ) + 6 Else Decrement y Let d be d + (( x - y ) * 4 ) + 10 End if Plot 8 points: ( xc+x, yc+y ) ( xc-x, yc+y ) ( xc+x, yc-y ) ( xc-x, yc-y ) ( xc+y, yc+x ) ( xc-y, yc+x ) ( xc+y, yc-x ) ( xc-y, yc-x ) End repeat


When variable in c gets memory After declaration or initialization?

Definition. Example: extern int x1; /* declaration */ int x2; /* definition */ int x3= 2; /* definition with initialization */