Category: 5th Semester
Unit 7- Socket Programming in Java(9hr)
Goal : Socket programming to build any networked application g. www(IE, Firefox), FTP (WinSCP) The four applications are A trivial date server and client, one-way communication. A capitalize server and client,two-way communication. A two-player tic tac toe game, illustrating a server that needs to keep track of the state of a game, and inform each […]
Continue ReadingComputer Graphics | Preboard Solution 2019
Group B Morgan Short Question Write a Program to draw a circle with radius 200 and center (500,700) using midpoint circle algorithm.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
import java.applet.Applet; import java.awt.Color; import java.awt.Graphics; public class CircleDemo extends Applet{ public void paint(Graphics g){ int r =200; int d = 1-r; int xc = 500, yc = 700; int x = 0; int y = r; do{ g.setColor(Color.red); //drawing an initial point g.drawOval(x+500, y+700, 2, 2); g.drawOval(y+500, x+700, 2, 2); g.drawOval(x+500, -y+700, 2, 2); g.drawOval(y+500, -x+700, 2, 2); g.drawOval(-y+500,-x+700, 2, 2); g.drawOval(-x+500, -y+700, 2, 2); g.drawOval(-x+500, y+700, 2, 2); g.drawOval(-y+500, x+700, 2, 2); if(d<0){ x=x+1; d = d + 2*x+3; } else{ x=x+1; y = y-1; d = d+2*(x-y)+5; }while(x<Y); } } |
Comprehensive Questions Define intensity attenuation and ambient light. Explain the procedure of Phong shading method for polygon rendering with its algorithm. Intensity attenuation means that a surface close to the light […]
Continue Reading2012 || Digital logic
Group B Q.no 12 Q.No 13 14. Design an asynchronous MOD-440 Counter. 15 16 17
Continue Reading