POV-Ray : Newsgroups : povray.general : 2D function to 3D tube : Re: 2D function to 3D tube Server Time
4 Feb 2023 01:02:53 EST (-0500)
  Re: 2D function to 3D tube  
From: Tor Olav Kristensen
Date: 27 Dec 2022 22:55:00
Message: <web.63abbd85560d6168d6142c8889db30a9@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
>...

> I'll post my own code here, and maybe you can spot why it's not working with
> just a simple Phi calculation.

I have had a thorough look at your code and modified it. You can find it here:

Newsgroup: povray.text.scene-files
Subject: Rewrite of tubecurves.pov (2D function to 3D tube)
Date: 2022-12-27 22:37:15
From: Tor Olav Kristensen
http://news.povray.org/povray.text.scene-files/thread/%3Cweb.63abb9396dfe9e73d6142c8889db30a9%40news.povray.org%3E


> > I can not understand why that should be necessary. - But it could be that
> > it's me that's missing something...
>
> I can only imagine I have some minor error somewhere that gets magnified
> later....

Sorry, but I have not found out exactly where your problem is.


> All I'm doing is storing the vertices of the tilted circle in a 2D array, and
> then moving along the curve and storing those circles.  Then I travel around the
> stored points in the circle array and make quads with 2 triangles.  Standard
> stuff.
> ...

Yes, that's a sensible way to do it.


>...
> Looks great in the positive quadrant/octant and in the smooth parts of
> the negative. So it's odd that it's not working well at specific points, and my
> graph of the Phi values was so discontinuous.
>
> Bear in mind that I've only done this for the implicit functions, not 3d the
> parametrics.  But I should get this sorted out and see what the problem is
> before I go any further.
>
> Thanks as always for your clear mind, sharp eyes, and _lightning fast_ code
> generation!

Hehe, no problem.

I had previously done some work related to this topic; with parametric
functions in 3D, so I already had some code to start with.

If you're interested, you can have a look at the "Trefoil Knot Tube"
example here:
https://github.com/t-o-k/scikit-vectors_examples

https://github.com/t-o-k/scikit-vectors_examples/blob/master/Trefoil_Knot_Tube.pdf

Sometimes GitHub fails to render PDF-files and Jupyter Notbook files (.ipynb).
If that happens, just wait a litte and then try again.

--
Tor Olav
http://subcube.com
https://github.com/t-o-k


Post a reply to this message

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