POV-Ray : Newsgroups : povray.binaries.images : Elliptical torus : Re: Elliptical torus Server Time
28 Apr 2024 16:23:25 EDT (-0400)
  Re: Elliptical torus  
From: Bald Eagle
Date: 12 May 2020 20:30:00
Message: <web.5ebb3ecea032ea3dfb0b41570@news.povray.org>
OK folks,

This is certainly challenging, but bit by bit, I think we're drawing closer to
figuring out where the difficulty is, and what is needed to overcome it.

I would be very interested in seeing the quartic equation, or at least the best
recollection of how it was derived.

As [creepily] often happens, I've had this tab open in my browser for quite some
time, but with the shader autoplay blocked by Brave, I didn't fully grasp what
it was about.

https://www.iquilezles.org/www/articles/distance/distance.htm

This was very exciting to me, as it solves some problems I've had with sine
waves and offset curves.
But as you can see, it also fixes the scaling of the thickness of an ellipse.
You can imagine this being used to fix a torus scaled into an elliptical torus.

https://www.shadertoy.com/view/MdfGWn
https://www.shadertoy.com/view/4tSfRz

I worked on it for a while, and got the simple 2D ellipse to work nicely, but
the 3D extrapolation to the torus didn't quite work out.

But then I thought - if one method is "off" one way, and this method is "off"
the other, .... then what happens if I blend them - will they cancel each other
out?

Almost.

What I've noticed while playing with parameters is that as Ricky observed, the
errors are accentuated by eccentricity and minor radius size.  Those errors seem
to be a shrinking effect in my original isosurface, and an expansion in the new
equation.  That error seems to be due to too much "z" at the ends, which then
tapers off as the curve approaches the z axis.

I haven't gotten the numerical gradient correction to work properly (yet), but
the approach makes sense, it feels like the right way to go due to its
simplicity, and most of my experiments had a max_gradient around 26.

The attached render has a gradient of 1770, but I rendered it with a holdover
value of only 355.


Post a reply to this message


Attachments:
Download 'implicitellipticaltorus_modgrad.png' (186 KB)

Preview of image 'implicitellipticaltorus_modgrad.png'
implicitellipticaltorus_modgrad.png


 

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