This project's report requires you to plan your approach before you begin writing code, so read the whole document before beginning implementation. Create data-files/model/cube.off, an axis-aligned cube with unit edge lengths, centered at the origin. You may make this file in a text editor directly, or write a procedure to generate it. Create a procedure (function or method) named makeCylinderthat generates a file data-files/model/cylinder.off given a radius and height. This file should be an indexed convex-polygon mesh for a cylinder about the yy-axis that is centered at the origin. Create a user interface for invoking makeCylinder. Use number boxes for the parameters and a button labelled “Generate” to actually launch the execution. Display a message on screen while generating and then flush the G3D::ArticulatedModelcache, and reload the current scene on completion. Write a procedure that generates a regular heightfield in data-files/model/heightfield.offwith elevation given by the grayscale values of an image file. Use a file dialog to select the file, a number box to scale the xx and zz integer coordinates by, and a number box to set the scale that 1.0 corresponds to for height. Make a button labelled “Generate” that launches the generator. Display a message on screen while generating and then flush the G3D::ArticulatedModel cache, and reload the current scene on completion. Write a procedure that generates a drinking glass from a contour by creating a solid of revolution and saves it as data-files/model/glass.off. You may make a user interface for the contour parameters, but are not required to. Make a number box that selects the number of rotational slices and a button labelled “Generate” that launches the generator. Display a message on screen while generating and then flush the G3D::ArticulatedModelcache, and reload the current scene on completion. The glass must have nonzero thickness for the bowl part that contains the liquid. It cannot have any “exposed backfaces”. The glass must have a stem or thick base that is not penetrated by an inner well (i.e., you can't just double all surfaces). The glass must be geometrically closedand water tight (i.e., it should topologically be a sphere) Create a visually interesting data-files/scene/demo.Scene.Anyscene by combining the elements from your program. Apply materials and lighting in the .Scene.Any

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Implement the following by extending the Cubes project. For all shapes, there should be no colocated vertices. For the meshes, you may use arbitrary indexed convex-polygon faces that G3D will automatically tessellate into triangles on load.

This project's report requires you to plan your approach before you begin writing code, so read the whole document before beginning implementation.

  1. Create data-files/model/cube.off, an axis-aligned cube with unit edge lengths, centered at the origin. You may make this file in a text editor directly, or write a procedure to generate it.
  2. Create a procedure (function or method) named makeCylinderthat generates a file data-files/model/cylinder.off given a radius and height. This file should be an indexed convex-polygon mesh for a cylinder about the yy-axis that is centered at the origin.
  3. Create a user interface for invoking makeCylinder. Use number boxes for the parameters and a button labelled “Generate” to actually launch the execution. Display a message on screen while generating and then flush the G3D::ArticulatedModelcache, and reload the current scene on completion.
  4. Write a procedure that generates a regular heightfield in data-files/model/heightfield.offwith elevation given by the grayscale values of an image file. Use a file dialog to select the file, a number box to scale the xx and zz integer coordinates by, and a number box to set the scale that 1.0 corresponds to for height. Make a button labelled “Generate” that launches the generator. Display a message on screen while generating and then flush the G3D::ArticulatedModel cache, and reload the current scene on completion.
  5. Write a procedure that generates a drinking glass from a contour by creating a solid of revolution and saves it as data-files/model/glass.off. You may make a user interface for the contour parameters, but are not required to. Make a number box that selects the number of rotational slices and a button labelled “Generate” that launches the generator. Display a message on screen while generating and then flush the G3D::ArticulatedModelcache, and reload the current scene on completion.
    1. The glass must have nonzero thickness for the bowl part that contains the liquid. It cannot have any “exposed backfaces”.
    2. The glass must have a stem or thick base that is not penetrated by an inner well (i.e., you can't just double all surfaces).
    3. The glass must be geometrically closedand water tight (i.e., it should topologically be a sphere)
  6. Create a visually interesting data-files/scene/demo.Scene.Anyscene by combining the elements from your program. Apply materials and lighting in the .Scene.Any
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Reference Types in Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education