NOC W5 - DNA Structure

A 3D interactive DNA Structure model.

Final Version: https://editor.p5js.org/WangZhewei1027/sketches/7sFeltx0A

Inspiration: The DNA Structure

Version 1: https://editor.p5js.org/WangZhewei1027/sketches/3ltoPkG7v

The version 1 code experimented with how to utilize sin() in the 3D world.

Version 2: https://editor.p5js.org/WangZhewei1027/sketches/0DgY9atrO

The version 2 code experimented with the basic structure of DNA.

![](/posts/NOC/Nature of Code 9f2fb9560c0a47f79ea86bf65f80dcb4/NOC W5 - DNA Structure ef722794580543ddbb6d89c3bd4238ab/ezgif-1-4506b92748_(1).gif)

Version 3: https://editor.p5js.org/WangZhewei1027/sketches/7sFeltx0A

Added chains and adjusted the details of the structure, made the overall visual effects more elegant.


Reflection:

I learned how to use sin() and cos() in 3D space. I think the overall visual effects can be improved, but I don’t have a good idea (maybe add a background). Maybe experiment with color schemes and lighting to evoke specific moods. Play with gradients, shadows, and ambient lighting to add depth and dimension to the scene.