Assignment 3

Instructions

Part 1

The Book of Shaders is one of the best references online for shader programming. Reading through it may help you understand concepts you are still having trouble with.

Read the sections on Shapes and Patterns and build a sketch that uses shaping functions to generate an interesting composition.

  • Use p5.js and WebGL.
  • Your effect should be coded in the fragment unit of your shader.
  • Your effect should not use any uniform textures as input.

Part 2

Build a solar system with moons, planets, and a sun.

  • Use three.js and WebGL.
  • Use parent-child relationships when adding your meshes to the scene. Moons should orbit around planets, and planets should orbit around the sun.
  • You don’t need to use SphereGeometry for all the shapes. Try some of the other included geometries.
  • Re-use the same material for all planets and re-use the same material for all moons.

If you have an idea but are not sure how to do it, ask on Discord and we can break it down and figure it out together.

Delivery

Due at the start of next class, April 9 2024 6:00pm. Some of the students will demo their project in class.

  • Host your project online and make sure it is accessible and working.
  • You can use p5.js Web Editor, CodeSandbox or any other online platform of your choice.
  • Make sure your code is well-formatted and well-commented.
  • Post the link to your work in the Discord channel #assignments-24.

Thank you!