POV-Ray : Newsgroups : povray.advanced-users : Pattern-Arithmetics Server Time
30 Jul 2024 00:21:46 EDT (-0400)
  Pattern-Arithmetics (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: Daniel Schwen
Subject: Pattern-Arithmetics
Date: 8 Nov 2000 08:35:13
Message: <3A096641.FB1CA85B@schwen.de>
Hello,
I hope this qualifies as advanced.
To calculate a CGH (computergenerated hologram) I need to create a
pattern which consists of the sum of several translated onion patterns
squared. How can I accomplish this? Layered textures obviously won't do
the trick.
Using an Isosurface function as the pattern would be perfect. Does that
work, and if so how?
Cheers,
Daniel


Post a reply to this message

From: J  Grimbert
Subject: Re: Pattern-Arithmetics
Date: 8 Nov 2000 09:56:32
Message: <3A0969A7.F8FF0C13@atos-group.com>
Daniel Schwen wrote:
> 
> Hello,
> I hope this qualifies as advanced.
> To calculate a CGH (computergenerated hologram) I need to create a
> pattern which consists of the sum of several translated onion patterns
> squared. How can I accomplish this? Layered textures obviously won't do
> the trick.

Would the average pattern be the solution...


Post a reply to this message

From: Vahur Krouverk
Subject: Re: Pattern-Arithmetics
Date: 8 Nov 2000 10:20:53
Message: <3A096FA9.3FD8D142@aetec.ee>
Daniel Schwen wrote:
> 
> Hello,
> I hope this qualifies as advanced.
> To calculate a CGH (computergenerated hologram) I need to create a
> pattern which consists of the sum of several translated onion patterns
> squared. How can I accomplish this? Layered textures obviously won't do
> the trick.
> Using an Isosurface function as the pattern would be perfect. Does that
> work, and if so how?
> Cheers,
> Daniel

Daniel,
one possibility would be to use my POV-Ray patch POVMan, which allows to
use RenderMan Shading Language for defining pigments. With this you can
create onion shader and use it as pigment in POV-Ray scene. I've made
small test with onion pattern, if you're interested, then drop me a note
and I'll post them in my homepage or send by email.
POVMan homepage:
http://www.aetec.ee/fv/vkhomep.nsf/pages/povman2


Post a reply to this message

From: Christoph Hormann
Subject: Re: Pattern-Arithmetics
Date: 8 Nov 2000 13:57:49
Message: <3A09A22B.10B9E2BE@schunter.etc.tu-bs.de>
Daniel Schwen wrote:
> 
> Hello,
> I hope this qualifies as advanced.
> To calculate a CGH (computergenerated hologram) I need to create a
> pattern which consists of the sum of several translated onion patterns
> squared. How can I accomplish this? Layered textures obviously won't do
> the trick.
> Using an Isosurface function as the pattern would be perfect. Does that
> work, and if so how?
> Cheers,
> Daniel

I do not understand what exactly you want to du, but in megapov you can use any
isosurface function as a pattern, for example:

pigment { function { ... } }


Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
Homepage: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Chris Huff
Subject: Re: Pattern-Arithmetics
Date: 8 Nov 2000 16:04:07
Message: <chrishuff-6627A5.16041008112000@news.povray.org>
In article <3A096641.FB1CA85B@schwen.de>, Daniel Schwen 
<dan### [at] schwende> wrote:

> Using an Isosurface function as the pattern would be perfect. Does that
> work, and if so how?

Just put the function in as a pattern, no syntax changes are needed.

#declare Onion = function {cos(sqrt(sqr(x) + sqr(y) + sqr(z)))}
// this is an onion-like pattern, a sine wave emanating from < 0, 0, 0>. 
// You could also use a pigment function, but that might render a little
// slower.

Then, in your pigment you want to use the pattern on:
pigment {
    function {
        sqr(
            Onion(x, y, z)
            + Onion(x-5, y+2, z-3)
            + Onion(x+2, y-4, z+1)
        )
    }
    color_map {...}
}

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Daniel Schwen
Subject: Re: Pattern-Arithmetics
Date: 8 Nov 2000 20:24:29
Message: <3a09fccd$1@news.povray.org>
> Just put the function in as a pattern, no syntax changes are needed.

That leaves me with one problem. The functionvalues are taken modulo 1, but
with several interfering waves I might get 'overexposures' on my
'photographic plate' which I don't want to warp back in intensity, but keep
white.
if(pattern>1) pattern=1
if(pattern<0) pattern=0
Would it be hard to implement a keyword like 'no_modulo' for the pigments?


Post a reply to this message

From: Chris Huff
Subject: Re: Pattern-Arithmetics
Date: 8 Nov 2000 21:46:14
Message: <chrishuff-07CE13.21461808112000@news.povray.org>
In article <3a09fccd$1@news.povray.org>, "Daniel Schwen" 
<sch### [at] geocitiescom> wrote:

> That leaves me with one problem. The functionvalues are taken modulo 
> 1, but with several interfering waves I might get 'overexposures' on 
> my 'photographic plate' which I don't want to warp back in intensity, 
> but keep white.
> if(pattern>1) pattern=1
> if(pattern<0) pattern=0

If you just want to limit the pattern to the range of 0 to 1, you can do 
that within the function:
max(0, min(1, YourFunction(x,y,z)))

This will clamp the function values to the range [0, 1], and avoid the 
repeating effect. I like to declare it as a separate function:
#declare Clamp = function {max(y, min(z, x))}
When you use "Clamp(Value, Min, Max)" in your function after declaring 
this, the function will return Value constrained to the range between 
Min and Max.


> Would it be hard to implement a keyword like 'no_modulo' for the 
> pigments?

What exactly would it do? Would it clamp the values instead of repeating 
the range [0, 1]?

Another thing that might help: just divide your function by a large 
enough number that it can't go outside that range. This will "darken" 
the areas without constructive interference, though...which might be 
what you want.
Oh, and be aware that the "Onion" function I gave will return negative 
values...you might want to use "cos(...)*0.5 + 0.5" or "sqr(cos(...))" 
instead of just "cos(...)". Again, this might be something you want to 
have...otherwise, there won't be any destructive interference.

I would suggest you keep the existing function(with negative values 
intact), divide the result of the function by the number of waveforms 
used(or the total of their amplitudes), and clamp it to the [0, 1] 
range.(it should already be <1 after those steps, but could still go <0)

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Matt Giwer
Subject: Re: Pattern-Arithmetics
Date: 11 Nov 2000 18:55:02
Message: <3A0DDC54.CB47E39D@ij.net>
Daniel Schwen wrote:
> 
> Hello,
> I hope this qualifies as advanced.
> To calculate a CGH (computergenerated hologram) I need to create a
> pattern which consists of the sum of several translated onion patterns
> squared. How can I accomplish this? Layered textures obviously won't do
> the trick.
> Using an Isosurface function as the pattern would be perfect. Does that
> work, and if so how?

	A real hologram? Then it is not onion patterns regardless of
appearance. 

	If you want to create a hologram of an image they you have to calculate
the phase interference sum at each point of the image of the rays from
all parts of the image. For an image of 1000 pixels that is 1000 phase
dependent rays per pixel. They can only be calculated correctly for a
single color, monochromatic light. 

-- 
States require proof of age for tobacco and alcohol
but not for lottery tickets. Ever wonder? 
	-- The Iron Webmaster, 233


Post a reply to this message

From: Daniel Schwen
Subject: Re: Pattern-Arithmetics
Date: 12 Nov 2000 03:21:50
Message: <3a0e531e$1@news.povray.org>
> A real hologram? Then it is not onion patterns regardless of
> appearance.
You're right, I just use the onion pattern to determine the phase phi(i) of
point source i, but then add the fields vectorial (plus reference light)
sum(sin(phi(i)))^2+sum(cos(phi(i)))^2
That only works for holograms of discrete point sources (glowing dots). For
that I already need sizes of abt. 8000x8000 pixels to see the pattern.

> If you want to create a hologram of an image they you have to calculate
> the phase interference sum at each point of the image of the rays from
> all parts of the image. For an image of 1000 pixels that is 1000 phase
> dependent rays per pixel.
Right, that would be nice, but again, to get reasonable results the
resolution must be much higher, and for a b times b pixel picture that's a
b^4 order problem. It would thke months to render.

> They can only be calculated correctly for a
> single color, monochromatic light.
That is true in any case. I'm trying to create a transmissive hologram by
taking a picture of my printed picture on bw film. That shrinks the size
considerably and gives me a nice diffracting high resolution pattern, which
I can aim my HeNe laser at.


Post a reply to this message

From: Matt Giwer
Subject: Re: Pattern-Arithmetics
Date: 12 Nov 2000 10:06:01
Message: <3A0EB1D9.D860AD6B@ij.net>
Daniel Schwen wrote:
> 
> > A real hologram? Then it is not onion patterns regardless of
> > appearance.
> You're right, I just use the onion pattern to determine the phase phi(i) of
> point source i, but then add the fields vectorial (plus reference light)
> sum(sin(phi(i)))^2+sum(cos(phi(i)))^2
> That only works for holograms of discrete point sources (glowing dots). For
> that I already need sizes of abt. 8000x8000 pixels to see the pattern.
> 
> > If you want to create a hologram of an image they you have to calculate
> > the phase interference sum at each point of the image of the rays from
> > all parts of the image. For an image of 1000 pixels that is 1000 phase
> > dependent rays per pixel.
> Right, that would be nice, but again, to get reasonable results the
> resolution must be much higher, and for a b times b pixel picture that's a
> b^4 order problem. It would thke months to render.
> 
> > They can only be calculated correctly for a
> > single color, monochromatic light.
> That is true in any case. I'm trying to create a transmissive hologram by
> taking a picture of my printed picture on bw film. That shrinks the size
> considerably and gives me a nice diffracting high resolution pattern, which
> I can aim my HeNe laser at.

	I am lost here. We are singing from the same hymnal. We agree it is a
huge task. We agree POVray can't do it. 

	Where are we going with this? 

-- 
Bill Clinton is sterile and Hillary has a daughter. 
Put three and three together for the unfaithful bitch.
     -- The Iron Webmaster, 11


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

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