|
|
Cousin Ricky <ric### [at] yahoocom> wrote:
> Attached is a cylinder bent around a circular arc.
>
> How did I get the texture to follow the bend? Easy: I spent 3 days
> throwing spaghetti at a wall until all of it stuck.
>
> I have to do this every time I use the cylindrical warp. I can explain
> all about how POV-Ray handles gamma and sRGB, but warp { cylindrical }
> is still black magic to me.
>
> The code will be in the next major release of DeskLamp.
Well, to be fair, you're doing one of those Cousin-Ricky level things that I
often find myself doing.
Cylindrical means cylindrical.
And you're deviating from that to toroidal.
If I had to guess the best way to do that, it would be by geometric inversion.
Your cylinder would be a torus of infinite radius, and then you'd translate it
relative to the center of inversion until you got a torus with the desired major
radius.
Dunno if recounting my cylindrical warp woes will help you any:
http://news.povray.org/povray.bugreports/thread/%3Cweb.5c01b8a81374e197765e06870%40news.povray.org%3E/
Excellent job getting it all to work!
I'm sure it must have been a hard slog to the finish line.
- BE
Post a reply to this message
|
|
|
|
On 4/26/24 21:02 (-4), Bald Eagle wrote:
>
> Cylindrical means cylindrical.
> And you're deviating from that to toroidal.
My intended task was to bend a solid texture into an arc. That it is
applied to a torus is incidental. I can't even begin to imagine dealing
with warp { toroidal }. (What you see in the animation is a solid
checker pattern. If I were dealing with uv-mapping, of course I would
have used toroidal.)
> If I had to guess the best way to do that, it would be by geometric inversion.
> Your cylinder would be a torus of infinite radius, and then you'd translate it
> relative to the center of inversion until you got a torus with the desired major
> radius.
I suppose if I were doing those calculations myself, I'd at least know
what I was doing. But without thinking too hard about it, it seems like
an overly convoluted and unnecessarily difficult way to get it done.
The main difficulty with warp { cylindrical } was getting all the parts
oriented and scaled properly, but the end code is remarkably simple, if
somewhat head-scratching.
FWIW, I did work from the center of curvature, then translate. And of
course, the unbent object (which does not appear in this animation,
because it is between frames) is a special case using a straight
cylinder, because infinite radii and translations are not fun.
> Excellent job getting it all to work!
> I'm sure it must have been a hard slog to the finish line.
Thanks!
Post a reply to this message
|
|