|
|
"Bill Pragnell" <bil### [at] hotmailcom> wrote:
> From the message timestamps, you spent an hour on that :)
Which is probably 50 min longer than it should have taken. ;)
> Looks great, but what am I looking at? Is this an actual warp by the renderer,
> or did you do something cunning with functions in SDL?
It is not, yet - but I'm hoping that now that I've got the rearrangement of the
pixels much clearer in my head, that it will be readily implemented as a proper
warp type in source code.
Your select() function jiggled something in my brain, and although I thought I
was going to be chasing my tail again, your modified Pattern(equation).x gave me
the kick I needed to go look at Lohmueller's page explaining matrix transforms.
Really Bill, thank you SO much for your post - it really helped me get this
damned thing sorted out, which has been nagging me since last year
http://news.povray.org/povray.binaries.images/thread/%3C5b492942%40news.povray.org%3E/?mtop=423470&moff=10
http://news.povray.org/povray.binaries.animations/thread/%3Cweb.5b5540daa3d27573458c7afe0%40news.povray.org%3E/
So all I did was rewrite the Pattern() function in terms of a rotation around y,
and apply curved Strength modifier to go from 1 at the origin to 0 at the
radius.
(WAAAAAY simpler than the psychotic Navier-Stokes stuff I was trying to do. I
just looked back at that code last night thinking maybe I'd use that as a
starting point for _this_ attempt, and NO WAY. That code looks like the "How
other people seem to use the public restroom" meme.)
Then after I posted my result, I realized that I needed to do a bit more work on
that (as expected), and fixed it so that any radius would work - not just 1 :O -
added a factor for the total amount of Twist applied at the center.
This morning, with the help of some coffee, and last night's realization that I
probably needed to test this out with a lot of different patterns, I worked
through 28 patterns and got them all to play relatively nicely with my function.
like with:
http://news.povray.org/povray.binaries.images/attachment/%3Cweb.5ad4e0b9bb501a74c437ac910%40news.povray.org%3E/woodlabe
l.png
I then dabbled with an alternate equation to fade in the "warp", and added a
term to choose between the two types. I think there's still a few different
ways to go about it that might be better depending on the pattern and the
desired final effect.
Now that I've almost broken it another 6 times trying to "improve"
(overcomplicate) it, I'm going to lay off on the math and write a scene to show
the effect on all of the patterns.
Then maybe we can have some good discussions about
a similar warp, but having two going next to each other - same or different
directions
See: https://www.youtube.com/watch?v=N7d_RWyOv20 ~4:50
repeating this with mod()
adding a shift
and possibly doing a circular mod() function where there are copies around a
radius. The results with the hexagon pattern suggested this, and if we could
add a few iterations, it would give a very cool fractal effect :O
OK. More coffee and coding.
More questions, comments, and ideas welcome as always.
Post a reply to this message
|
|