POV-Ray : Newsgroups : povray.general : Flux Server Time
16 Nov 2024 15:18:03 EST (-0500)
  Flux (Message 1 to 9 of 9)  
From: Yann
Subject: Flux
Date: 29 Oct 2003 20:10:28
Message: <3fa06504$1@news.povray.org>
Hello,

I want to use a pattern defined by a function. I know that it is possible to
access the coordinates from inside the function, however is it possible to
access the normal vector to the object ?

Thanks,
Yann


Post a reply to this message

From: Warp
Subject: Re: Flux
Date: 29 Oct 2003 20:27:22
Message: <3fa068f9@news.povray.org>
Yann <[antispam]rollin***@mit..edu))> wrote:
> is it possible to access the normal vector to the object ?

  No.

  (You might want to search for the povman patch which might have this
property.)

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Yann
Subject: Re: Flux
Date: 29 Oct 2003 21:09:47
Message: <3fa072eb@news.povray.org>
All right...

more specificaly, I would like to encode the flux of a certain vector field
V by a color along a surface. Are you telling me that there is no simple way
to do that with POVRAY?

There is the pattern slope which does almost what I want, except that it
returns a value which doesn't depend on the length of V (only on the angle).

Could I modify afterward the color returned by the slope pattern, according
to the length of V?

As you see, I am quite reluctant to learn how to use povman patch.

Yann


"Warp" <war### [at] tagpovrayorg> wrote in message
news:3fa068f9@news.povray.org...
> Yann <[antispam]rollin***@mit..edu))> wrote:
> > is it possible to access the normal vector to the object ?
>
>   No.
>
>   (You might want to search for the povman patch which might have this
> property.)
>
> -- 
> #macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb
M()}}
> N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
> N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  -
Warp -


Post a reply to this message

From: Christopher James Huff
Subject: Re: Flux
Date: 29 Oct 2003 22:30:06
Message: <cjameshuff-2555CC.22280729102003@netplex.aussie.org>
In article <3fa06504$1@news.povray.org>,
 "Yann" <[antispam]rollin***@mit..edu))> wrote:

> I want to use a pattern defined by a function. I know that it is possible to
> access the coordinates from inside the function, however is it possible to
> access the normal vector to the object ?

Very unfortunately, this is not possible. Of course, if you know the 
object the pattern is being applied to, you can compute the normal given 
the point being evaluated, but this is only practical in very limited 
and simple cases.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Christopher James Huff
Subject: Re: Flux
Date: 29 Oct 2003 22:38:52
Message: <cjameshuff-85E877.22365429102003@netplex.aussie.org>
In article <3fa072eb@news.povray.org>,
 "Yann" <[antispam]rollin***@mit..edu))> wrote:

> more specificaly, I would like to encode the flux of a certain vector field
> V by a color along a surface. Are you telling me that there is no simple way
> to do that with POVRAY?

An interesting idea...but there is no simple way to do this in the 
general case. You could do it for meshes easily enough, just do it 
per-vertex.


> Could I modify afterward the color returned by the slope pattern, according
> to the length of V?

Slope returns a floating point scalar, not a color. And you can't alter 
the slope vector with a function. And the slope pattern itself will not 
work in a function, it needs to be applied to a surface. So you probably 
can't do what you want...


> As you see, I am quite reluctant to learn how to use povman patch.

It is probably the simplest and best way of doing what you want. You 
could of course patch in normal parameters to function patterns, or just 
patch in your flux pattern/pigment directly. (An interesting idea for a 
pattern: use the angle between the surface normal and the gradient of a 
function.)

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: ABX
Subject: Re: Flux
Date: 30 Oct 2003 03:45:58
Message: <vij1qvo0ofajcg35f7i1fgrre7o9o303tt@4ax.com>
On Wed, 29 Oct 2003 21:09:45 -0500, "Yann" <[antispam]rollin***@mit..edu))>
wrote:
> All right...
>
> more specificaly, I would like to encode the flux of a certain vector field
> V by a color along a surface. Are you telling me that there is no simple way
> to do that with POVRAY?

Yes and no. Patterns are not only related to the objects. They can exist in
medias, sky, expressions. But for many objects you could try to write
functions which return normal components for given coordinates , though only
for some subset of primitives. What object type you are looking for ?

ABX


Post a reply to this message

From: Christoph Hormann
Subject: Re: Flux
Date: 30 Oct 2003 04:02:02
Message: <tg0771-l22.ln1@triton.imagico.de>
Yann wrote:
> All right...
> 
> more specificaly, I would like to encode the flux of a certain vector field
> V by a color along a surface. Are you telling me that there is no simple way
> to do that with POVRAY?

If you have the vector field defined as a function in POV (as a set of 
df3 files for example) it is fairly easy to calculate other properties 
of that field.  You can find some examples for this in the
sample scene 'incdemo/func_gradient.pov'.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 25 Oct. 2003 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Yann
Subject: Re: Flux
Date: 30 Oct 2003 20:07:35
Message: <3fa1b5d7$1@news.povray.org>
Thanks again for your advice. Of course if the object is simple enough,
it is easy to deduce what's the normal from the knowledge of its position.
However I wanted to deal with more complicated objects like animated blobs
or other  primitives with a normal perturbed by a wild normal noise.

I could as well construct all my object as big mesh and calculate the color
of each triangle using a little C program but it's a bit painfull, and
sillly since povray spends its time (I guess) to acces normal vector in
order to render the pictures.

So I am trying to install Povman now. I managed to install megapov --- easy!
But I don't manage to install Povman on the top, it isn't well documented
and I am not a linux guru... any help?

Thanks,
Yann



"Christopher James Huff" <cja### [at] earthlinknet> wrote in message
news:cja### [at] netplexaussieorg...
> In article <3fa06504$1@news.povray.org>,
>  "Yann" <[antispam]rollin***@mit..edu))> wrote:
>
> > I want to use a pattern defined by a function. I know that it is
possible to
> > access the coordinates from inside the function, however is it possible
to
> > access the normal vector to the object ?
>
> Very unfortunately, this is not possible. Of course, if you know the
> object the pattern is being applied to, you can compute the normal given
> the point being evaluated, but this is only practical in very limited
> and simple cases.
>
> -- 
> Christopher James Huff <cja### [at] earthlinknet>
> http://home.earthlink.net/~cjameshuff/
> POV-Ray TAG: chr### [at] tagpovrayorg
> http://tag.povray.org/


Post a reply to this message

From: Vahur Krouverk
Subject: Re: Flux
Date: 31 Oct 2003 13:55:29
Message: <3fa2b021$1@news.povray.org>
Yann wrote:
> So I am trying to install Povman now. I managed to install megapov --- easy!
> But I don't manage to install Povman on the top, it isn't well documented
> and I am not a linux guru... any help?

Linux guru? But by your message header it seems that you use Windows? If 
you are using Windows, then readme file contains overview, what you 
should do. Basically you should copy executables into same directory, 
where POV-Ray (or MegaPOV) executables are and add this directory to 
path environment variable in order to access shading language compiler 
easily.
If you are using Linux then it requires more work. Unfortunately I don't 
have access to Linux machine right now and latest version of POVMan is 
not tested with Linux, so this may require more work before you can 
achieve results. Easiest way would be to create copy of MegaPov source 
in different directory, copy POVMan files (from diff source code 
package) over MegaPOV source files, add additional files in patches 
directory to makefile and make it. POVSLC files will go to separate 
directory and you should modify makefile in order to be able to make it 
with Linux tools (if you really need, then I can dig out old makefile 
for Linux from previous version).
If you need further assistance, then feel free to mail me.


Post a reply to this message

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