POV-Ray : Newsgroups : povray.general : 2D function to 3D tube : Re: 2D function to 3D tube Server Time
19 Apr 2024 14:58:11 EDT (-0400)
  Re: 2D function to 3D tube  
From: Droj
Date: 21 Dec 2022 18:20:00
Message: <web.63a39476560d61682844deea3b2af915@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Droj" <803### [at] drojde> wrote:
>
> > The meshmaker.inc that comes with Povray 3.7 works definitely great.
> > To make it a bit clearer where the problem is see:
> >
> > T_HeartCurve_00a1.png
> >
> > The glitch is somewhere in my Povray script.
> >
> > And I can't find out where.
> >
> > Any ideas?
>
> I usually kinda suck at this unless I've been doing it for some period of time.
>
> I'm just gonna guess that you need to emulate the way a torus is described
> parametrically.
>
> Wolfram gives:
>
>  (c-sqrt(x^2+y^2))^2+z^2=a^2,
> (1)
> and the parametric equations are
>
> x = (c+acosv)cosu
> (2)
> y = (c+acosv)sinu
> (3)
> z = asinv
>
> With c = major radius, a = minor radius, and probably swap y & z axes.
>
> In the Isosurface Tutorial, Mike states that he has a scene that emulates a
> sphere sweep and always makes the cross section perpendicular to the spline
> axis.  So maybe you can find that file and see what he does.
>
> I posted a zip of all the files here:
>
http://news.povray.org/povray.off-topic/message/%3C60a2d177%40news.povray.org%3E/#%3C60a2d177%40news.povray.org%3E

Thanks the input! It's highly appreciated.

Can you download and open the zip-file I attached in my first post?
It's the POV script I used.
I am not using a torus but a circle as cross section for the tube that follows
the graph of the heart curve. And the atan2 function - Povray knows this
function it's in math.inc - manages that the angle of the cross section is
perpendicular to the curve of the heart curve.

The question is why are some parts of the tube flatened as indicated in the
image T_HeartCurve_00a1.png??


Post a reply to this message

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