dilevin / computer-graphics-meshes

Computer Graphics Assignment about Meshes
1 stars 6 forks source link

Initial vertex positions for cube and sphere #25

Open ginkxo opened 4 years ago

ginkxo commented 4 years ago

Since these are not given to us, I assume we need to initialize them ourselves? I tried to give the cube 'unit' vertex positions (e.g. (0,0,0), (0,0,1), ... (1,1,1) ), but I'm a bit puzzled as to how to do this for the sphere -- is there anywhere in the textbook or the slides that might help with this?

chenjas commented 4 years ago

Even if we define the centre of the sphere to be (0, 0, 0), the camera will reposition so that the object is in the centre view.

ginkxo commented 4 years ago

Thank you, but I was wondering more about the actual generation of the vertices rather than the camera positioning. Can we assume the radius of our sphere is 1, and that for the 2D UV parameterization we can choose an arbitrary corner to be (0,0)?

songfeil commented 4 years ago

You can assume the radius to be 1. But I think there’s a certain corner to be (0,0), so that when you start the code the earth have a correct direction.

在 2020年2月20日,19:11,ash k. notifications@github.com 写道:

 Thank you, but I was wondering more about the actual generation of the vertices rather than the camera positioning. Can we assume the radius of our sphere is 1, and that for the 2D UV parameterization we can choose an arbitrary corner to be (0,0)?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.