Orthographic Wireframe Display

Using the Khan Academy tutorial on generating 3D shapes, I built a basic program capable of displaying 3D shapes using orthographic projection. The program asks for input from the user, either in progressive or compacted form, and draws a wireframe out of triangles. The format for both is simple: "x000x000x000" where x is either an "a" or "n" for positive and negative, respectively, and the 000s represent any number up to 999, on the standard 3D coordinate system of x,y,z. You can use wasdqe to rotate the model and the arrow keys to shift it. For example, to display a simple pyramid, enter in the following (copy and paste for ease):

(for the first prompt):

(and for the second):

(Note: the rotation speed, the movement speed, and the size of the nodes can be changed by the user via slide variables)

All feedback or suggestions are welcome!

Update Log:

-Initial Release

0.10 (Latest Version)
-Turbo mode is now the default for post-input rendering
-Commentary is now present within the code
-The model is automatically re-rendered whenever nodeSize is changed
-Nodes are now drawn after edges

1 Like

Very cool! Running it in turbo mode really makes a big difference (and setting all sliders to a small value).

One suggestion I'd make is to try and separate your code into more manageable chunks. It's quite hard to understand as it is now.

Very nice - one small suggestion would be to be to make it re-draw if you change the node size

Thank you for your suggestions! I will work on comments in the code to explain what's going on, and include a small script for updating the render when the node size is changed.

Edit: The new version is now available in the OP which includes the suggestions and turbo mode for post-input rendering.

Nice! :+1: