Vector Fields
Mohammad H. Chaghazardi
Fall – winter 2011
In this presentation:
2. The coding of the problem
3. The Graphics of the problem
1. The physics of the problem
The Physics
The Physics Field Drawing styles
The PhysicsStatics
The Physics
Moving chargeHighest Accuracy
The PhysicsStray Charge
The Code• Using Arrays instead of Vectors• Function calling• draw function• Scan function ( causes undesired delays)• Super Position function (numerical process)• …
The GraphicsTurbo C ! Dream era
Borland 5
GNU or DEV + Graphics and winBGIm libraries
The GraphicsHow to Draw an Animation ?
1. Drawing the Plot• Using the circle and line
statements
2. Showing the Plot• Picturing Delays
3. Clearing the Plot• Using cleardevice ( ) function
4. Drawing again!
Type 1
FAIL
!
The GraphicsHow to Draw an Animation ?
Type 2
1. Drawing a Plot• Using the circle and line
statements
2. Showing the Plot1. Picturing Delays
3. Drawing an inverse for the Plot
4. Drawing again!FAIL
!
The GraphicsHow to Draw an Animation ?
Type 3
USE OF PAGES IN BGI
PASS !
The GraphicsHow to Draw an Animation ?
Type 3
1. Showing Page 1 : setvisualpage ( int x)2. Selecting Page 2 : setactivepage( int x)3. Drawing Page 24. Showing Page 25. Selecting Page 16. Clearing Page 17. Drawing Page 1 or 28. Goto 1