3d > 2d transform - How can I do this.
Hello, I've been working with a plotter recently.
And it's got me wondering how I can translate between 3d (x,y,z) data to 2d(x,y) that I can plot?
Say I have a torus like this:
What's the best way to project it into 2 dimensions? I don't have a clue where to begin.
Thanks for any pointers.
J
loving those plot images John!
i would suggest iterating through the geometry (use matrixoutput 2 to include the spatial transform) and using worldtoscreen to get screen coordinates. basic example using jit.mgraphics below.
note though that this example is just drawing lines between subsequent vertices. for more sophisticated drawing (e.g. the triangle grid drawing of the gl.mesh) you'll have to adjust the algorithm.
Thanks Rob, that's absolutely brilliant!
View this post on InstagramA post shared by Leafcutter John (@leafcutterjohn) on