Uses the provided skeleton code as a foundation for your


Problem statement: Write a basic 3D model viewer.

Requirements:

Write a 3D model viewer with the following features in Java:

• Uses the provided skeleton code as a foundation for your application. You can modify it as you wish.

• Can load model data from the model files with .dat extension provided on the Stream course page (this

functionality is provided in the skeleton code). You will need to decide on a data structure to store the data.

• Six buttons to increment and decrement the x, y, and z positions of the model in world space, using a translation transform, by a sensible value based on the canvas size (e.g. 10%). The origin must be located at the centre of the screen.

• Three sliders with a range of 0-360 each that adjust the model's rotation in the xy, xz, and yz planes in local model space.

• Two buttons to scale the model up or down by a factor of 1.1 and 0.9, respectively. The initial scale must be chosen based on the model extent such that the model fits nicely into the viewport.

• All transformations must be implemented using matrices.

• Three check boxes: one to toggle rendering the wireframe, one to toggle filling in the polygons' surface area, and one to toggle back-face culling.

• Cull faces that are facing away from the camera when rendering solid objects (i.e. not only the wireframe) and the user has enabled culling. The camera should be located at the origin and facing down the negative z-axis.

• Render the model using the Painter's algorithm. The rendered wireframe model should appear "solid" when the
respective check box is selected. The wireframe mesh should also be clearly visible, overlaid on the surface, when this option is enabled.


Attachment:- New WinRAR archive.rar

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Uses the provided skeleton code as a foundation for your
Reference No:- TGS01131306

Now Priced at $15 (50% Discount)

Recommended (94%)

Rated (4.6/5)