Title: Revolve a 2D XY function around Z? Post by: Patryk Kizny on November 14, 2015, 03:36:00 PM Hey,
I got a simple maths problem, but can't seem to have brainpower to solve it quickly. Let's assume we have some function like IQ impulse or so. (http://iquilezles.org/www/articles/functions/gfx02.png) Now I want to use it to create a 3D function by revolving the shape around Z (vertical) axis. So essentially I want to use it as a shape for a lathe object. (http://help.autodesk.com/cloudhelp/2016/ENU/3DSMax/images/GUID-B50EB946-132D-400C-9831-C0A272C2713F.png) That should be simple. Any hints? Title: Re: Revolve a 2D XY function around Z? Post by: Patryk Kizny on November 14, 2015, 04:46:00 PM Nevermind - easier than I thought.
Code: // Cubic pulse 1D Title: Re: Revolve a 2D XY function around Z? Post by: Patryk Kizny on November 14, 2015, 07:01:39 PM So the above works, but I have no idea how can I scale it non-uniformly, so that it gives me an elongated shape based on the vec2 w scales. |