+1(316)4441378

+44-141-628-6690


Warning: Use of undefined constant woothemes - assumed 'woothemes' (this will throw an Error in a future version of PHP) in /home/admin/web/qualityessayresearch.com/public_html/wp-content/themes/cushy/archive.php on line 47
Archive for the ‘Java Open GL Program’
Warning: Use of undefined constant woothemes - assumed 'woothemes' (this will throw an Error in a future version of PHP) in /home/admin/web/qualityessayresearch.com/public_html/wp-content/themes/cushy/archive.php on line 47
Category

Java JWJGL

Write a Java program using only NetBeans 8.2 IDE which uses the LWJGL library to draw a window of 640x480 in the center of the screen.

Your program should then read in coordinates from a file titled coordinates.txt and draw the primitives in the same window using the algorithms for each primitive.

The program should draw the primitives in different colors (red for lines, blue for circles and green for ellipses) on a black background.

Use the glVertex2f() command to plot the primitives pixel by pixel. Finally, your program should also use the input.Keyboard class to have the escape key quit your application.

If you are motivated enough, you may also add extra functional keys that would allow the user to change the colors of the primitives. These added functions should be clearly stated in your comments.

The given coordinates.txt file will be in the following format:

l -15,-15 150,180
c 100,150 80
e 225,370 35,75
l -100,100 50,75
e 20