POV-Ray : Newsgroups : povray.binaries.images : it's not about photons... Server Time
25 Apr 2024 03:41:25 EDT (-0400)
  it's not about photons... (Message 1 to 9 of 9)  
From: Kontemplator
Subject: it's not about photons...
Date: 6 Jan 2018 18:50:01
Message: <web.5a515ff3a888ae64bf095d010@news.povray.org>
I found an 8GB SODIMM under the XMas tree and so I plan a media photon animation
as my major Pov-Ray project for these year. I have some struggle with the
texture for that "Thing" in the middle. How can I apply the warning stripes in a
more propper way? I thought that could be a challenge for the proffessionals in
these helpfull group. Any sugestions please?

#declare Thing=
difference{
sphere {0,9.05 pigment {rgb 0.1}}
sphere {0,8.55 pigment {rgb 0.1}}
cylinder {<-10,0,0>,<10,0,0>,5.01 texture {T_warn1 scale 10}}
plane {z,-1 hollow texture {T_warn1 scale 10}}
finish {diffuse .25}
photons {collect off}
}


Post a reply to this message


Attachments:
Download 'photon_laboratory_02123.png' (501 KB)

Preview of image 'photon_laboratory_02123.png'
photon_laboratory_02123.png


 

From: Kenneth
Subject: Re: it's not about photons...
Date: 6 Jan 2018 22:25:00
Message: <web.5a5191ce7e154b36a47873e10@news.povray.org>
Here is one way to do it. I remade your T_warn1 texture as T_warn_2. You might
need another very similar texture (with a different radial 'frequency') for your
plane, so that the warning stripes there look equal in size to the cylinder's
stripes.

#declare T_warn_2 =
texture{
pigment{
    radial
    sine_wave
    frequency 16
        color_map{
            [.5 rgb 0]
            [.5 rgb <1,.7,0>]
                 }
       }
    }

#declare Thing=
difference{
sphere {0,9.05 pigment {rgb 0.1}}
sphere {0,8.55 pigment {rgb 0.1}}
cylinder{<0,-10,0>, <0,10,0> 5.01 // made in Y instead of X
  texture {T_warn_2}
  rotate 90*z
  }
plane {z,-1 hollow texture {T_warn_2 rotate 90*x}}
finish {diffuse .25}
photons {collect off}
}


Post a reply to this message

From: Kontemplator
Subject: Re: it's not about photons...
Date: 7 Jan 2018 06:20:00
Message: <web.5a5201577e154b36bf095d010@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
> Here is one way to do it. I remade your T_warn1 texture as T_warn_2. You might
> need another very similar texture (with a different radial 'frequency') for your
> plane, so that the warning stripes there look equal in size to the cylinder's
> stripes.
>
> #declare T_warn_2 =
> texture{
> pigment{
>     radial
>     sine_wave
>     frequency 16
>         color_map{
>             [.5 rgb 0]
>             [.5 rgb <1,.7,0>]
>                  }
>        }
>     }
>
> #declare Thing=
> difference{
> sphere {0,9.05 pigment {rgb 0.1}}
> sphere {0,8.55 pigment {rgb 0.1}}
> cylinder{<0,-10,0>, <0,10,0> 5.01 // made in Y instead of X
>   texture {T_warn_2}
>   rotate 90*z
>   }
> plane {z,-1 hollow texture {T_warn_2 rotate 90*x}}
> finish {diffuse .25}
> photons {collect off}
> }

Thanks a lot, after hours of waiting I got it. My math fails in calculating the
exakt radius of the sphere at the intersection point with the plane so I alterd
the frequency in an animation until it looked good. Guess thats a lazy way but
studying math would take much longer.


Post a reply to this message

From: Kontemplator
Subject: Re: it's not about photons...
Date: 7 Jan 2018 06:30:01
Message: <web.5a52038c7e154b36bf095d010@news.povray.org>
"Kontemplator" <haf### [at] yahoocom> wrote:

....after hours of waiting ...

Next time might turn off photons and radiosity for testing textures or use the
+q option. But that's the problem if you are a part time Pover. :)


Post a reply to this message

From: Bald Eagle
Subject: Re: it's not about photons...
Date: 7 Jan 2018 10:45:01
Message: <web.5a5240327e154b365cafe28e0@news.povray.org>
Use a radial pattern.
This is just a modification of the one in the drop-down Insert menu.


 torus {10, 1 texture{ pigment {radial frequency 35
                         color_map { [0.0 color Black]
                            [0.25 color Black]
                                     [0.25 color Yellow]
                                     [0.75 color Yellow]
                                     [0.75 color Black]
                                     [1.0 color Black]
                                  }
                       }
                finish { diffuse 0.9 phong 1 }
              } // end of texture


Post a reply to this message

From: Bald Eagle
Subject: Re: it's not about photons...
Date: 7 Jan 2018 12:30:06
Message: <web.5a52586f7e154b365cafe28e0@news.povray.org>
"Kontemplator" <haf### [at] yahoocom> wrote:

> Thanks a lot, after hours of waiting I got it. My math fails in calculating the
> exakt radius of the sphere at the intersection point with the plane

Your radius in a plane varies as the sin of the angle.

The angle is a function of the distance away from the center as you travel
perpendicular to that plane, from the edge of the sphere in the direction of the
center.  Specifically the arc-cosine.

So, you start off at the radius r, and move r-d.
The cosine of an angle is adjacent/hypotenuse.
your r-d is the cathetus, or adjacent edge, and the radius is the hypotenuse.
so theta is acos (r-d, r)
to get the remaining cathetus, or opposite edge, you need to calculate the sin
of that angle
sin theta = opposite/hypotenuse

so sin (acos (r-d, r)) = opposite/hypotenuse

multiplying both sides by the hypotenuse (r) gives you the length of the
cathetus, which is the radius of the circle you're looking for (r2)

#declare r2 = r * sin (acos (r-d, r));


Post a reply to this message

From: Bald Eagle
Subject: Re: it's not about photons...
Date: 7 Jan 2018 12:50:01
Message: <web.5a525cf47e154b365cafe28e0@news.povray.org>
diagram:

http://news.povray.org/*/attachment/%3Cweb.5a525c2aa608280b5cafe28e0%40news.povray.org%3E/radius-at-intersection.png


Post a reply to this message

From: Kontemplator
Subject: Re: it's not about photons...
Date: 7 Jan 2018 13:30:00
Message: <web.5a52666b7e154b36bf095d010@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> diagram:
>
>
http://news.povray.org/*/attachment/%3Cweb.5a525c2aa608280b5cafe28e0%40news.povray.org%3E/radius-at-intersection.png

Thanks Bald Eagle for the explanation. I read these geometric wisdoms and i
remembered my math final examination. I disgrace myself but the theme was "all i
know about the circle". Maybe it comes back if I don't need it.


Post a reply to this message

From: Bald Eagle
Subject: Re: it's not about photons...
Date: 7 Jan 2018 15:00:01
Message: <web.5a527c037e154b365cafe28e0@news.povray.org>
"Kontemplator" <haf### [at] yahoocom> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> > diagram:
> >
> >
http://news.povray.org/*/attachment/%3Cweb.5a525c2aa608280b5cafe28e0%40news.povray.org%3E/radius-at-intersection.pn
g
>
> Thanks Bald Eagle for the explanation. I read these geometric wisdoms and i
> remembered my math final examination. I disgrace myself but the theme was "all i
> know about the circle". Maybe it comes back if I don't need it.

Nah, it took me a lot of struggling and remembering / relearning all of things I
either forgot or never really learned the first time around.
At this point, I've been doing trig regularly for a couple of years, so the
calculations, and more importantly, the logic behind WHAT I need to do comes a
lot more quickly.

More often than I'd like, I still find myself calculating around in ... circles.

I hope your scene is coming along nicely.

I like your light effects - they're mapped photons, not media?


Post a reply to this message

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