POV-Ray : Newsgroups : povray.general : 2D function to 3D tube : Re: 2D function to 3D tube Server Time
26 Apr 2024 10:36:09 EDT (-0400)
  Re: 2D function to 3D tube  
From: Droj
Date: 24 Dec 2022 15:35:00
Message: <web.63a76234560d6168baa940d23b2af915@news.povray.org>
"Droj" <803### [at] drojde> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> > "Bald Eagle" <cre### [at] netscapenet> wrote:
> >
> > > I'm confident that this is a solvable problem.
> >
> >
> > As I said.   Success!   :)
> >
> > Looks like all you have to do is change these two lines:
> >
> > I got the atan to give me a "clean" curve, but it was really skinny.   "maybe
> > that's just rotated 90 deg from what it should be...?
> > So I got rid of the pi/2.  No idea _why_ that works...   yet.
> >
> >
> > #declare PHI = function (u) {-atan2( FdY(u), FdX(u) ) + pi/2*0};
> >
> > #declare F1 = function(u,v) {QY(v)*sin(PHI(u)) + FX(u)};
>
> Heureka and congratulations! You solved that 'pain in the backside'.
>
> I adapted the POV-script according to the functions above and it looks great!
> Changing QX to QY in F1 did the trick. And right, the pi/2 produces a
> very, very flat curve almost like a ribbon.
>
> I will try to do some fine tuning as the heart curve still has an inconsistency
> where the dip is.
>
> But all in all it's a beauty and I'm definitely happy.
>
> I wish you a Merry Christmas and thank you so much.
>
> Oswald

PS:
Your solution works with simple Lissajous functions, too.

This is a great Christmas present!


Post a reply to this message


Attachments:
Download 't_lissa1_3_4.png' (469 KB)

Preview of image 't_lissa1_3_4.png'
t_lissa1_3_4.png


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.