$40
HW2
Goal
1. Draw a sphere: Earth
2. The Earth is rotating.
3. Add textures on the Earth
*Use GLSL to do this homework, otherwise you’ll get zero points.
Spec
Camera:
Posi&on: (0, 0, 3)
Center: (0, 0, 0)
Up vector: (0, 1, 0)
Earth:
Slice: 360
Stack: 180
Radius: 1
Texture: earth_texture_map.jpg
Texture coordinates
slice
Score
Ø2. Add the texture on the sphere and rotate it. (25%) Ex:
Ø3. Demo (10%) (We will ask you some questions about this homework)
Others
1. Use Visual Studio 2017 or 2019 for this homework. (If you use Mac, you should bring your computer to demo.)
2. You can do this homework from the “HW2Example” project file and follow the instrucOons in HW2guideline.pdf.
3. Zip your Visual Studio project into “ StudentID_HW2.zip” , and upload it to New e3.
4. The deadline is at 11:55 pm on November 25.
5. If you submit your homework late, the score will be discounted. submit between (11/26 ̴ 12/2) : Your final score * 0.9 submit between (12/2 ̴ 12/9) : Your final score * 0.8 submit a_er 12/10 : Your final score * 0.7
How to draw a sphere
Draw a sphere
Draw a sphere
Triangle strip – Reuse some ver4ces to draw the triangles, so we can save the storage space.
According to the picture, we only need 5 ver4ces to store 3 triangles.
V1
V2
V3
V4
V5
V2 V4 Triangle 2 Triangle 3
V1
V3
Draw a sphere