POV-Ray : Newsgroups : povray.binaries.images : Ultimate black hole Server Time
6 Nov 2024 10:26:09 EST (-0500)
  Ultimate black hole (Message 1 to 8 of 8)  
From: Bill Pragnell
Subject: Ultimate black hole
Date: 12 Jul 2019 19:40:01
Message: <web.5d2919d8729ff1951b6c6b3a0@news.povray.org>
Messing with textures for use in spherical structures (because reasons).

Couldn't get the effect I was after with black hole warps, so a function pigment
instead:

#declare Pattern = function {
 pigment {
  agate color_map { [0 rgb 0] [1 rgb 1] }
 }
}
#declare Sucker = function(x,y,z,R) {
 select(
  sqrt(x*x + y*y + z*z) - R,
  Pattern(R*x/sqrt(x*x+y*y+z*z), R*y/sqrt(x*x+y*y+z*z),
R*z/sqrt(x*x+y*y+z*z)).x,
  Pattern(x,y,z).x
 )
}


Post a reply to this message


Attachments:
Download 'suck.jpg' (151 KB)

Preview of image 'suck.jpg'
suck.jpg


 

From: Bald Eagle
Subject: Re: Ultimate black hole
Date: 12 Jul 2019 21:45:00
Message: <web.5d2937663da779db4eec112d0@news.povray.org>
This sucks!

:D


This looks very much like where I was starting with the Spiral Warp - but never
quite worked it out all the way...

It looks like it should be animated, with some Dr. Who music pumping....   :)


Post a reply to this message

From: Bald Eagle
Subject: Re: Ultimate black hole
Date: 12 Jul 2019 22:45:01
Message: <web.5d2944a23da779db4eec112d0@news.povray.org>
Ha!

However, sometimes, lack of sleep, stubbornness, a gin & tonic, and a bit of
Lohmueller guidance makes things work out a bit better   :)


Post a reply to this message


Attachments:
Download 'bp_bh_warp.png' (479 KB)

Preview of image 'bp_bh_warp.png'
bp_bh_warp.png


 

From: Mike Horvath
Subject: Re: Ultimate black hole
Date: 13 Jul 2019 01:02:15
Message: <5d2965d7@news.povray.org>
On 7/12/2019 10:40 PM, Bald Eagle wrote:
> Ha!
> 
> However, sometimes, lack of sleep, stubbornness, a gin & tonic, and a bit of
> Lohmueller guidance makes things work out a bit better   :)
> 


Nice job both of you!

Maybe it's time to update Chris Colefax's galaxy include.

Also, I always wanted nice looking weather patterns on my Earth-like 
planet script (Object Collection).


Michael


Post a reply to this message

From: Bill Pragnell
Subject: Re: Ultimate black hole
Date: 13 Jul 2019 08:00:01
Message: <web.5d29c7433da779db1b6c6b3a0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> However, sometimes, lack of sleep, stubbornness, a gin & tonic, and a bit of
> Lohmueller guidance makes things work out a bit better   :)

From the message timestamps, you spent an hour on that :)

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?


Post a reply to this message

From: Jörg "Yadgar" Bleimann
Subject: Re: Ultimate black hole
Date: 13 Jul 2019 08:10:50
Message: <5d29ca4a$1@news.povray.org>
Hi(gh)!

On 13.07.19 04:40, Bald Eagle wrote:
> Ha!
> 
> However, sometimes, lack of sleep, stubbornness, a gin & tonic, and a bit of
> Lohmueller guidance makes things work out a bit better   :)


can't figure out yet how you did it!

See you in Khyberspace!

Yadgar


Post a reply to this message

From: Bald Eagle
Subject: Re: Ultimate black hole
Date: 13 Jul 2019 10:55:01
Message: <web.5d29f0323da779db4eec112d0@news.povray.org>
"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

From: Bill Pragnell
Subject: Re: Ultimate black hole
Date: 13 Jul 2019 12:05:00
Message: <web.5d2a00b63da779db1b6c6b3a0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> 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

Well you're welcome, of course, but even after glancing over those previous
threads I still feel slightly none the wiser :)

> OK.   More coffee and coding.

Post some more example images, or even some code if you're willing to share! A
new warp type sounds juicy :D

And it's funny you should mention overcomplication, because the first thing I
started thinking about once I got mine working was how to introduce a falloff...
even though I don't need one for what I had in mind for this!

Bill


Post a reply to this message

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