POV-Ray : Newsgroups : povray.newusers : Wavelength to RGB converter? Server Time
12 Oct 2026 00:29:47 EDT (-0400)
  Wavelength to RGB converter? (Message 1 to 38 of 38)  
From: Kaveh
Subject: Wavelength to RGB converter?
Date: 28 Feb 2003 19:49:37
Message: <1fr4a7h.44sdcb1jqm0yuN%kaveh@delete_this.focalimage.com>
Is there an .inc file that converts a wavelength to the approximate
equivalent RGB components? I am looking for perfect accuracy. An
approximate look-up table will do. 

-- 
Kaveh


Post a reply to this message

From: Christopher James Huff
Subject: Re: Wavelength to RGB converter?
Date: 28 Feb 2003 20:49:14
Message: <cjameshuff-6A6C5B.20444028022003@netplex.aussie.org>
In article <1fr4a7h.44sdcb1jqm0yuN%kaveh@delete_this.focalimage.com>,
 kav### [at] delete_thisfocalimagecom (Kaveh) wrote:

> Is there an .inc file that converts a wavelength to the approximate
> equivalent RGB components? I am looking for perfect accuracy. An
> approximate look-up table will do.

You contradict yourself. Perfection or approximation, pick one...only an 
approximation is possible though.
You want to find the RGB values that would mimic monochrome light of a 
specific wavelength? There are no includes that do this that I know of. 
You could find the sensitivity curves of typical human eyes, and work up 
a macro that uses a spline generated from these curves.

Some sites which might be useful:
http://www.adobe.com/support/techguides/color/colortheory/vision.html
http://www.yorku.ca/eye/specsens.htm

BTW, what do you want this for? I can't think of many uses for this, 
except as a part of a system for converting spectral data to RGB.

-- 
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: Ive
Subject: Re: Wavelength to RGB converter?
Date: 28 Feb 2003 21:44:40
Message: <3e601e98$1@news.povray.org>
> specific wavelength? There are no includes that do this that I know of.
> You could find the sensitivity curves of typical human eyes, and work up
> a macro that uses a spline generated from these curves.
>

For the records.
Jaime Vives Piqueres' lightsys (a set of include files to generate realistic lighting)
is able to do this.

http://www.ignorancia.org/t_lightsys.php

-Ive


Post a reply to this message

From: Kaveh
Subject: Re: Wavelength to RGB converter?
Date: 1 Mar 2003 06:01:42
Message: <1fr524g.eym5jvaqbxdsN%kaveh@delete_this.focalimage.com>
Christopher James Huff <cja### [at] earthlinknet> wrote:

> In article <1fr4a7h.44sdcb1jqm0yuN%kaveh@delete_this.focalimage.com>,
>  kav### [at] delete_thisfocalimagecom (Kaveh) wrote:
> 
> > Is there an .inc file that converts a wavelength to the approximate
> > equivalent RGB components? I am looking for perfect accuracy. An
> > approximate look-up table will do.
> 
> You contradict yourself. Perfection or approximation, pick one...only an
> approximation is possible though.

Oops. A bad typo to make. I meant to say "I am *not* looking for perfect
accuracy"!! 

[...]

> 
> BTW, what do you want this for? I can't think of many uses for this, 
> except as a part of a system for converting spectral data to RGB.

I am writing a program to mimic the reconstruction of holographic
images. When a hologram (of a point object, say) is made with one
wavelength, and replayed with another wavelenth, the image is displaced,
and distorted, as a function of the wavelength. (This is because of the
dispersion of light, which in diffractive optics is some 40 time greater
than in refractive optics.) 

I want the old image to be shown in the original wavelength colour, and
the new one in the colour of the new wavelength, as closely as
practical. So for each wavelength there would be a value in a lookup
table for the RGB to use.

When we use a large number of wavelengths, as in white light, I want to
see a more or less continuous spectrum of light, with each spectral
image in its correct position.

Thanks for your help. I will check the sites you mentioned.

-- 
Kaveh


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Wavelength to RGB converter?
Date: 1 Mar 2003 07:53:25
Message: <20030301135324.6a16c4c3.jaimevives@ignorancia.org>
On Sat, 1 Mar 2003 11:01:42 +0000
kav### [at] delete_thisfocalimagecom (Kaveh) wrote:

> I want the old image to be shown in the original wavelength colour,
> and the new one in the colour of the new wavelength, as closely as
> practical. So for each wavelength there would be a value in a lookup
> table for the RGB to use.
> 
> When we use a large number of wavelengths, as in white light, I want
> to see a more or less continuous spectrum of light, with each spectral
> image in its correct position.

  Check CIE.inc conained on my lightsys package (Ive posted the URL on
a previous reply). It has some macros to convert wavelength to several
RGB color systems, based on the CIE XYZ color space tranformations. Ive
done all this job alone, as a replacement for my lightsys color macros,
which used a poor aproximation at first based on Dan Bruton algorithm.

  Using CIE.inc, you sould be done with the Wavelength(W) macro, where
W is the wavelength in nm.( the default color system is sRGB). Have fun!

-- 
Jaime Vives Piqueres
		
La Persistencia de la Ignorancia
http://www.ignorancia.org


Post a reply to this message

From: Kaveh
Subject: Re: Wavelength to RGB converter?
Date: 1 Mar 2003 10:49:26
Message: <1fr5fsj.1beeuyb1xw7s8mN%kaveh@delete_this.focalimage.com>
Jaime Vives Piqueres <jai### [at] ignoranciaorg> wrote:

> On Sat, 1 Mar 2003 11:01:42 +0000
> kav### [at] delete_thisfocalimagecom (Kaveh) wrote:
> 
> > I want the old image to be shown in the original wavelength colour,
> > and the new one in the colour of the new wavelength, as closely as
> > practical. So for each wavelength there would be a value in a lookup
> > table for the RGB to use.
> > 
> > When we use a large number of wavelengths, as in white light, I want
> > to see a more or less continuous spectrum of light, with each spectral
> > image in its correct position.
> 
>   Check CIE.inc conained on my lightsys package (Ive posted the URL on
> a previous reply). It has some macros to convert wavelength to several
> RGB color systems, based on the CIE XYZ color space tranformations. Ive
> done all this job alone, as a replacement for my lightsys color macros,
> which used a poor aproximation at first based on Dan Bruton algorithm.
> 
>   Using CIE.inc, you sould be done with the Wavelength(W) macro, where
> W is the wavelength in nm.( the default color system is sRGB). Have fun!

I just downloaded all those and saw that. It is *exactly* what I need.
And congratulations for doing so much work on color. It's not an easy
field!

I am probably doing something silly here, but when I run your test file:

===============
    #include "lightsys.inc"            // main include
    #include "lightsys_CIE-sRGB"       // saved rgb values for common
colors
    
    // global variables
    #declare BRIGTHNESS=1.25;              // a little "overexposed"
    #declare WHITE_POINT=Wp_Daylight_Film; // translate white point to
5500K 
    #declare COLOR_FILTER=CC05R;           // 5% CC red filter

    // obtain a light_source
    object{
     Light(Cl_Cool_White_Fluor,Lm_Fluorescent_15w,9*x,9*z,4,4,0)
    }
===============

I get an error:

===============
Parsing...File: rgbtest.pov  Line: 1

    #include "lightsys_CIE-sRGB"

    #declare WHITE_POINT=Wp_Daylight_F     // a little "overexposed"

ilm <----ERROR

Parse Error: Cannot assign uninitialized identifier.
===============

It complains that Wp_Daylight_Film is not initialized, but it is, in
lightsys_CIE-sRGB. Can you see what I am doing wrong?

-- 
Kaveh


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Wavelength to RGB converter?
Date: 1 Mar 2003 11:22:41
Message: <20030301172241.0b6e3890.jaimevives@ignorancia.org>
On Sat, 1 Mar 2003 15:49:27 +0000
kav### [at] delete_thisfocalimagecom (Kaveh) wrote:

> I just downloaded all those and saw that. It is *exactly* what I need.

  Nice! And don't forget to show us the results!

> And congratulations for doing so much work on color. It's not an easy
> field!

  Yeah... but here all the merit goes to Ive, who done the hard work
researching and implementing color transformations. I'm still learning
and trying to understand it all, but I know already enough to see that
there are plenty of potential applications for CIE.inc. 

> I am probably doing something silly here, but when I run your test
> file:

  Oh! No! You used the non-tested example on the readme! :)

> I get an error:
> 
> ===============
> Parsing...File: rgbtest.pov  Line: 1

  Hmmmm... line 1 ????

> It complains that Wp_Daylight_Film is not initialized, but it is, in
> lightsys_CIE-sRGB. Can you see what I am doing wrong?

  Sorry, I've not tested this example, and it is not functional as it
does not contains any scenery. Better try any of the demo files
included, for example demo_basic.pov.

-- 
Jaime Vives Piqueres
		
La Persistencia de la Ignorancia
http://www.ignorancia.org


Post a reply to this message

From: William F  Pokorny
Subject: Re: Wavelength to RGB converter?
Date: 1 Mar 2003 13:40:50
Message: <3E60FEB3.EB7D364B@attglobal.net>
Jaime Vives Piqueres wrote:
> 
> On Sat, 1 Mar 2003 15:49:27 +0000
> kav### [at] delete_thisfocalimagecom (Kaveh) wrote:
> 

Jamie, 
I want to interject that the page http://www.ignorancia.org/t_lightsys.php shows
up blank for me when I access it using netscape from a PC or from an unix box.
However, I can view the page source from within netscape and Internet Explorer
works fine. I am not sure what is amiss. Does anyone else get the blank page
with netscape? Oh, and pages on your site other than the techniques page display
as expected.   
Bill P.


Post a reply to this message

From: gonzo
Subject: Re: Wavelength to RGB converter?
Date: 1 Mar 2003 14:45:57
Message: <3e610df5$1@news.povray.org>
William F. Pokorny <pok### [at] attglobalnet> wrote in message
news:3E60FEB3.EB7D364B@attglobal.net...
>
> Jamie,
> I want to interject that the page http://www.ignorancia.org/t_lightsys.php
shows
> up blank for me when I access it using netscape from a PC or from an unix
box.
> However, I can view the page source from within netscape and Internet
Explorer
> works fine. I am not sure what is amiss. Does anyone else get the blank
page
> with netscape?

Yes, I had the same thing. Only that page, all other pages work fine.  I
could view source to get the link to download.

RG


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Wavelength to RGB converter?
Date: 1 Mar 2003 15:21:07
Message: <20030301212106.1bf42fe3.jaimevives@ignorancia.org>
On Sat, 01 Mar 2003 13:40:51 -0500
"William F. Pokorny" <pok### [at] attglobalnet> wrote:

  Oops! Sorry, a table was not properly closed.... thanks for pointing
it out. Next time I will check also with netscape for any major change.

-- 
Jaime Vives Piqueres
		
La Persistencia de la Ignorancia
http://www.ignorancia.org


Post a reply to this message

From: Kaveh
Subject: Re: Wavelength to RGB converter?
Date: 2 Mar 2003 19:38:34
Message: <1fr7z0r.fzn6hw1xohuzqN%kaveh@delete_this.focalimage.com>
Jaime Vives Piqueres <jai### [at] ignoranciaorg> wrote:

> On Sat, 1 Mar 2003 15:49:27 +0000
> kav### [at] delete_thisfocalimagecom (Kaveh) wrote:
> 
> > I just downloaded all those and saw that. It is *exactly* what I need.
> 
>   Nice! And don't forget to show us the results!
> 
> > And congratulations for doing so much work on color. It's not an easy
> > field!
> 
>   Yeah... but here all the merit goes to Ive, who done the hard work
> researching and implementing color transformations. I'm still learning
> and trying to understand it all, but I know already enough to see that
> there are plenty of potential applications for CIE.inc. 
> 
> > I am probably doing something silly here, but when I run your test
> > file:
> 
>   Oh! No! You used the non-tested example on the readme! :)
> 
> > I get an error:

[...]

I had a file directory problem, now solved.

The Wavelength() macro works and I am very happy. Now when I send a ray
through a system (in conventional optical 'forward' ray tracing), not
only are the angles calculated in povray, but the ray has the correct
color. :-)

-- 
Kaveh


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Wavelength to RGB converter?
Date: 3 Mar 2003 04:42:54
Message: <20030303104253.34bc79f1.jaimevives@ignorancia.org>
On Mon, 3 Mar 2003 00:38:39 +0000
kav### [at] delete_thisfocalimagecom (Kaveh) wrote:

> 
> I had a file directory problem, now solved.

  Which was exactly the problem? I'm about to install POV on a eMac with
Mac OS X, and it will be nice to be aware of it... 

> The Wavelength() macro works and I am very happy. Now when I send a
> ray through a system (in conventional optical 'forward' ray tracing),
> not only are the angles calculated in povray, but the ray has the
> correct color. :-)

  I'm glad it served to you. It's also nice to discover one more use for
the CIE macros (again don't forget to post the final pic!).

-- 
Jaime Vives Piqueres
		
La Persistencia de la Ignorancia
http://www.ignorancia.org


Post a reply to this message

From: Ian J  Burgmyer
Subject: Re: Wavelength to RGB converter?
Date: 3 Mar 2003 22:41:49
Message: <3e64207d$1@news.povray.org>
Jaime Vives Piqueres's furious key-hammering produced this:
>> I had a file directory problem, now solved.
> 
>   Which was exactly the problem?

I'm guessing that he simply forgot to set the path to the lightsys3 directory
in his POV-Ray settings.

> I'm about to install POV on a eMac with
> Mac OS X, and it will be nice to be aware of it... 

One thing to keep in mind with MacPOV and MacMegaPOV (hint: use MacMegaPOV...the
official 3.5 doesn't use all the CPU power in OS X) is that you have to set the
include file paths.  Unlike the Windows version, the Mac OS release does not
set the path for you.  Minor inconvenience, I assure you. :)

One thing to note, unlike with many "common" applications, there is not much of
a benefit to using a PowerPC processor with POV-Ray (my G4-733, for instance, is
only a touch faster than my P3-750 at rendering).  So a 2.0GHz Pentium 4 will
probably beat a G4-1.25 hands down.

-- 
/*^*/light_source{100*<-5,2,-5>2}#macro I(i,n)#while(strlen(i)>=n)#local A=asc(
substr(i,n,1));#local a=asc(substr(i,n+1,1));cylinder{<div(A,8)-12,mod(A,8)-4,4
><div(a,8)-12,mod(a,8)-4,4>,0.1pigment{rgb z}}#local n=n+2;#end#end I("ScUe[]"1
/*<*/)I("mkmtlttk"1)//@_$#!,:<"Thhis polysig brought to you by Ian Burgmyer :)"


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Wavelength to RGB converter?
Date: 4 Mar 2003 03:25:59
Message: <3e646317$1@news.povray.org>
In article <3e64207d$1@news.povray.org> , "Ian J. Burgmyer" 
<the### [at] maccom> wrote:

> (hint: use MacMegaPOV...the
> official 3.5 doesn't use all the CPU power in OS X)

This isn't true.  This is only a rumor created by Chris Huff.

    Thorsten

____________________________________________________
Thorsten Froehlich
e-mail: mac### [at] povrayorg

I am a member of the POV-Ray Team.
Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Christopher James Huff
Subject: Re: Wavelength to RGB converter?
Date: 4 Mar 2003 07:45:28
Message: <cjameshuff-EE0AED.07405704032003@netplex.aussie.org>
In article <3e646317$1@news.povray.org>,
 "Thorsten Froehlich" <tho### [at] trfde> wrote:

> > (hint: use MacMegaPOV...the
> > official 3.5 doesn't use all the CPU power in OS X)
> 
> This isn't true.  This is only a rumor created by Chris Huff.

It is true, and testable. The preview version you released may fix it, I 
have not tested that, but the official release left a large chunk of the 
CPU idle, from 20-30%, while MacMegaPOV pinned the CPU at 100%.

-- 
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: Thorsten Froehlich
Subject: Re: Wavelength to RGB converter?
Date: 4 Mar 2003 08:29:21
Message: <3e64aa31$1@news.povray.org>
In article <cja### [at] netplexaussieorg> , 
Christopher James Huff <cja### [at] earthlinknet>  wrote:

> It is true, and testable. The preview version you released may fix it, I
> have not tested that, but the official release left a large chunk of the
> CPU idle, from 20-30%, while MacMegaPOV pinned the CPU at 100%.

What is more relevant what comes out in the end, not what some fuzzy CPU
usage indicator suggests is going on.  As you know, there is no way to tell
a "while(1) { }" from an actual computation...

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Wavelength to RGB converter?
Date: 4 Mar 2003 08:34:17
Message: <3e64ab59@news.povray.org>
In article <cja### [at] netplexaussieorg> , 
Christopher James Huff <cja### [at] earthlinknet>  wrote:

> The preview version you released may fix it,

BTW, I should point out that 3.51 (of which a public Mac beta is available)
cannot be directly compared with 3.5 because of some antialising bug fixes
that among other scenes also affect benchmark.pov.

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Kaveh
Subject: Re: Wavelength to RGB converter?
Date: 4 Mar 2003 12:55:53
Message: <1frb5p0.15dl6aycxuthcN%kaveh@delete_this.focalimage.com>
Ian J. Burgmyer <the### [at] maccom> wrote:

> Jaime Vives Piqueres's furious key-hammering produced this:
> >> I had a file directory problem, now solved.
> > 
> >   Which was exactly the problem?
> 
> I'm guessing that he simply forgot to set the path to the lightsys3 directory
> in his POV-Ray settings.

Well, I put aliases to these files in the include directory, so as to
keep the files organized and separate. There was no error when reading
the 'include' command, so it saw the file, but did not *really* read it,
i.e. the declarations were not made. When I put in the files directly
into 'include', it worked. 

-- 
Kaveh


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Wavelength to RGB converter?
Date: 4 Mar 2003 14:50:56
Message: <20030304205055.6fa081aa.jaimevives@ignorancia.org>
On Tue, 4 Mar 2003 17:55:53 +0000
kav### [at] delete_thisfocalimagecom (Kaveh) wrote:

> Well, I put aliases to these files in the include directory, so as to
> keep the files organized and separate. There was no error when reading
> the 'include' command, so it saw the file, but did not *really* read
> it, i.e. the declarations were not made. When I put in the files
> directly into 'include', it worked. 

  Ah! I see.. That explains it all. POV reads the link file, and not
follows the link to the real files... hmmm... I've never used links
with POV: let me try.. It works fine here with the Linux version.
Perhaps a problem with your custom compile? 

-- 
Jaime Vives Piqueres
		
La Persistencia de la Ignorancia
http://www.ignorancia.org


Post a reply to this message

From: Christopher James Huff
Subject: Re: Wavelength to RGB converter?
Date: 4 Mar 2003 18:47:32
Message: <cjameshuff-BED34A.18473304032003@netplex.aussie.org>
In article <3e64aa31$1@news.povray.org>,
 "Thorsten Froehlich" <tho### [at] trfde> wrote:

> What is more relevant what comes out in the end, not what some fuzzy CPU
> usage indicator suggests is going on.  As you know, there is no way to tell
> a "while(1) { }" from an actual computation...

Well, it is doing something, and I don't think it is looping. Renders 
also finish faster. I haven't checked how much having the preview up 
affects this, though. It certainly is possible that MegaPOV is really 
wasting that extra CPU power and rendering faster for some other reason.

-- 
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: Ian J  Burgmyer
Subject: Re: Wavelength to RGB converter?
Date: 4 Mar 2003 20:31:47
Message: <3e655383$1@news.povray.org>
Thorsten Froehlich's furious key-hammering produced this:
>> (hint: use MacMegaPOV...the
>> official 3.5 doesn't use all the CPU power in OS X)
> 
> This isn't true.  This is only a rumor created by Chris Huff.

Right...that's why it's reproducable on my system (and yes, MacMegaPOV works
fine).  I haven't tried the 3.5.1 preview yet, so I can't say anything about
that.

Followups set to povray.macintosh.

-- 
/*^*/light_source{100*<-5,2,-5>2}#macro I(i,n)#while(strlen(i)>=n)#local A=asc(
substr(i,n,1));#local a=asc(substr(i,n+1,1));cylinder{<div(A,8)-12,mod(A,8)-4,4
><div(a,8)-12,mod(a,8)-4,4>,0.1pigment{rgb z}}#local n=n+2;#end#end I("ScUe[]"1
/*<*/)I("mkmtlttk"1)//@_$#!,:<"Thhis polysig brought to you by Ian Burgmyer :)"


Post a reply to this message

From: Ian J  Burgmyer
Subject: Re: Wavelength to RGB converter?
Date: 4 Mar 2003 20:34:56
Message: <3e655440@news.povray.org>
Jaime Vives Piqueres's furious key-hammering produced this:
>   Ah! I see.. That explains it all. POV reads the link file, and not
> follows the link to the real files... hmmm... I've never used links
> with POV: let me try.. It works fine here with the Linux version.
> Perhaps a problem with your custom compile? 

Aliases in Mac OS might be implemented differently than symbolic links in Linux
and Windows NT.  Maybe one of the Mac OS developers around here can answer
that... *nudges Chris and Thorsten* ;)

-- 
/*^*/light_source{100*<-5,2,-5>2}#macro I(i,n)#while(strlen(i)>=n)#local A=asc(
substr(i,n,1));#local a=asc(substr(i,n+1,1));cylinder{<div(A,8)-12,mod(A,8)-4,4
><div(a,8)-12,mod(a,8)-4,4>,0.1pigment{rgb z}}#local n=n+2;#end#end I("ScUe[]"1
/*<*/)I("mkmtlttk"1)//@_$#!,:<"Thhis polysig brought to you by Ian Burgmyer :)"


Post a reply to this message

From: Christopher James Huff
Subject: Re: Wavelength to RGB converter?
Date: 4 Mar 2003 21:11:05
Message: <cjameshuff-2FB581.21110704032003@netplex.aussie.org>
In article <3e655440@news.povray.org>,
 "Ian J. Burgmyer" <the### [at] maccom> wrote:

> Aliases in Mac OS might be implemented differently than symbolic 
> links in Linux and Windows NT.  Maybe one of the Mac OS developers 
> around here can answer that... *nudges Chris and Thorsten* ;)

They are different, not quite like either symbolic or hard links. I 
think they work this way: they contain a link to the actual file, so if 
the file gets moved around, they stay attached to it. They also contain 
the last location of the file, so if it gets deleted and replaced with 
another, the alias points to the replacement. That way, aliases don't 
break when files move around, and generally do what the user wants to do.

I don't know if/how POV handles them, though.

-- 
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: Thorsten Froehlich
Subject: Re: Wavelength to RGB converter?
Date: 5 Mar 2003 03:36:34
Message: <3e65b712$1@news.povray.org>
In article <cja### [at] netplexaussieorg> , 
Christopher James Huff <cja### [at] earthlinknet>  wrote:

> I don't know if/how POV handles them, though.

Unlike in Windos, in Mac OS and Unix, links (or aliases) are completely
transparent for applications.  Thus there is no difference between them.  Of
course, links (or aliases) can break.  So it does make sense to check if
tehy are really valid.  A user can do so using the Finder.

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Kaveh
Subject: Re: Wavelength to RGB converter?
Date: 5 Mar 2003 07:26:53
Message: <1frbj3u.sqlop61bczl34N%kaveh@delete_this.focalimage.com>
Jaime Vives Piqueres <jai### [at] ignoranciaorg> wrote:

> On Tue, 4 Mar 2003 17:55:53 +0000
> kav### [at] delete_thisfocalimagecom (Kaveh) wrote:
> 
> > Well, I put aliases to these files in the include directory, so as to
> > keep the files organized and separate. There was no error when reading
> > the 'include' command, so it saw the file, but did not *really* read
> > it, i.e. the declarations were not made. When I put in the files
> > directly into 'include', it worked. 
> 
>   Ah! I see.. That explains it all. POV reads the link file, and not
> follows the link to the real files... hmmm... I've never used links
> with POV: let me try.. It works fine here with the Linux version.
> Perhaps a problem with your custom compile? 

Could be. I don't know enough about the workings. My Linux friends
compiled it so everything works (except this maybe). Now I understand.
It doesn't understand the Mac alias pointing to the real file.

-- 
Kaveh


Post a reply to this message

From: Tom Melly
Subject: Re: Wavelength to RGB converter?
Date: 5 Mar 2003 07:59:31
Message: <3e65f4b3$1@news.povray.org>
"Kaveh" <kav### [at] delete_thisfocalimagecom> wrote in message
news:1frbj3u.sqlop61bczl34N%kaveh@delete_this.focalimage.com...
>
> Could be. I don't know enough about the workings. My Linux friends
> compiled it so everything works (except this maybe). Now I understand.
> It doesn't understand the Mac alias pointing to the real file.
>

I'm missing something - I thought Mac used Linux now? (or do they use some
proprietary method to handle alias's? Why?)


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Wavelength to RGB converter?
Date: 5 Mar 2003 09:09:02
Message: <20030305150859.655281b3.jaimevives@ignorancia.org>
On Wed, 5 Mar 2003 12:59:32 -0000
"Tom Melly" <tom### [at] tomandlucouk> wrote:

> I'm missing something - I thought Mac used Linux now? (or do they use
> some proprietary method to handle alias's? Why?)

  No, Apple uses now a Unix-based kernel (BSD). Linux is a Unix-like
system, wich is not exactly the same. I think they don't use clasic unix
links, but I'm still on my "first encounters" with Mac OS X, so I don't
know for sure. 


-- 
Jaime Vives Piqueres
		
La Persistencia de la Ignorancia
http://www.ignorancia.org


Post a reply to this message

From: Christopher James Huff
Subject: Re: Wavelength to RGB converter?
Date: 5 Mar 2003 14:27:48
Message: <cjameshuff-DE9BE5.14274705032003@netplex.aussie.org>
In article <3e65f4b3$1@news.povray.org>,
 "Tom Melly" <tom### [at] tomandlucouk> wrote:

> I'm missing something - I thought Mac used Linux now?

No, OS X is based on BSD.


> (or do they use some proprietary method to handle alias's?

Not really...they are the only ones who handle aliases. They serve a 
similar purpose to links, but are not links.


> Why?)

Because they work better. There are web pages out there that go into far 
more detail on this than I could.

-- 
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: Ian J  Burgmyer
Subject: Re: Wavelength to RGB converter?
Date: 5 Mar 2003 21:44:46
Message: <3e66b61e$1@news.povray.org>
Thorsten Froehlich's furious key-hammering produced this:
>> I don't know if/how POV handles them, though.
> 
> Unlike in Windos, in Mac OS and Unix, links (or aliases) are completely
> transparent for applications.

Actually, all NT-based Windows versions support links for directories when using
NTFS.  Microsoft, of course, chose not to give any good support for them (or
allow links to files).  I think the only Windows NT release to actually make use
of NTFS links (which MS calls "junctions") are the Server releases.  These
junction points are transparent to applications as well, but as I said before,
cannot be made without third-party software (stupidly enough...).

-- 
/*^*/light_source{100*<-5,2,-5>2}#macro I(i,n)#while(strlen(i)>=n)#local A=asc(
substr(i,n,1));#local a=asc(substr(i,n+1,1));cylinder{<div(A,8)-12,mod(A,8)-4,4
><div(a,8)-12,mod(a,8)-4,4>,0.1pigment{rgb z}}#local n=n+2;#end#end I("ScUe[]"1
/*<*/)I("mkmtlttk"1)//@_$#!,:<"Thhis polysig brought to you by Ian Burgmyer :)"


Post a reply to this message

From: Tom Melly
Subject: Re: Wavelength to RGB converter?
Date: 6 Mar 2003 04:24:25
Message: <3e6713c9$1@news.povray.org>
"Christopher James Huff" <cja### [at] earthlinknet> wrote in message
news:cja### [at] netplexaussieorg...

<snip>

What really annoys me about win95/98 shortcuts to directories (I can't remember
if this is fixed under 2k/xp), is that you can't navigate using them if you are
trying to save a file. Windows just assumes you want to overwrite the .lnk file,
rather than go to the directory or file it points to.

f-ups set.


Post a reply to this message

From: Warp
Subject: Re: Wavelength to RGB converter?
Date: 6 Mar 2003 06:06:33
Message: <3e672bb9@news.povray.org>
Thorsten Froehlich <tho### [at] trfde> wrote:
> Unlike in Windos, in Mac OS and Unix, links (or aliases) are completely
> transparent for applications.  Thus there is no difference between them.  Of
> course, links (or aliases) can break.

  Actually there are two types of links in Unix: Hard links and soft links.

  Hard links can't break. A hard link is basically a duplicate entry in the
file allocation table (ie. it looks like two different files, but they
actually point two the same physical data in the disk). The file pointed
by hard links is removed only when all hard links to it are deleted (that's
why a hard link can never break). This feature, however, imposes a limitation
on hard links: The file pointed by the hard link must be located in the
same partition as the link itself.
  A soft link is looser: It's not bound to the file it points, as the hard
link, and it can point to any file anywhere. A soft link is simply an entry
which contains a path to the file it points (which can be absolute or
relative). A soft link is basically the name of a file. If the file is
deleted, the soft link breaks (because the file pointed by the soft link
does not exist anymore).

  From the point of view of applications, they don't see any difference
between files, hard or soft links (unless the specifically ask the system
with a specialized system call).

  Links are extremely handy. For example there are many applications which
create their setting/cache/etc files in the home directory of the user.
I have a limited quota in my home directory here and thus it's very limited
what I can place there. However, I have plenty of space in the local HD of
my work computer (my home directory is located in a network drive). When
the directory of some program takes too much space, I simply move it to
the local HD and make a soft link in my home directory pointing to the
new location; the program does not notice anything and works perfectly
(but it now writes everything to the local HD instead of my home directory).

  I curse Windows every time I would need this handy feature there... :)

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Christopher James Huff
Subject: Re: Wavelength to RGB converter?
Date: 6 Mar 2003 11:09:48
Message: <cjameshuff-D24563.11094806032003@netplex.aussie.org>
In article <3e672bb9@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

>   Actually there are two types of links in Unix: Hard links and soft links.

An alias is a bit of both. You can move the target around or rename it 
and it stays attached, but if you delete the file, it breaks. If you 
replace it with another file with the same name, the alias directs to 
the new file.
Hard and soft links are supported as usual, but you can't create them 
from the Finder.


>   From the point of view of applications, they don't see any difference
> between files, hard or soft links (unless the specifically ask the system
> with a specialized system call).

I don't know if aliases are implemented like this. An attempt to open an 
alias with the standard C code may attempt to open the actual alias 
file, not its target. To properly written Mac programs they behave like 
the target itself would, though.

-- 
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: Warp
Subject: Re: Wavelength to RGB converter?
Date: 6 Mar 2003 11:28:44
Message: <3e67773b@news.povray.org>
Christopher James Huff <cja### [at] earthlinknet> wrote:
> I don't know if aliases are implemented like this. An attempt to open an 
> alias with the standard C code may attempt to open the actual alias 
> file, not its target.

  That would diminish the usefulness of aliases a lot.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Christopher James Huff
Subject: Re: Wavelength to RGB converter?
Date: 6 Mar 2003 17:10:20
Message: <cjameshuff-421C2D.17102106032003@netplex.aussie.org>
In article <3e67773b@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

> > I don't know if aliases are implemented like this. An attempt to open an 
> > alias with the standard C code may attempt to open the actual alias 
> > file, not its target.

Well, the command line tools don't recognize them, so I guess this is 
the case.


>   That would diminish the usefulness of aliases a lot.

Not really, almost everything uses higher level API's. The standard Unix 
tools don't, but that's about it.

-- 
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: Thorsten Froehlich
Subject: Re: Wavelength to RGB converter?
Date: 6 Mar 2003 17:10:23
Message: <3e67c74f@news.povray.org>
In article <3e66b61e$1@news.povray.org> , "Ian J. Burgmyer" 
<the### [at] maccom> wrote:

> NTFS.

I know that NTFS supports them. It had to so M$ could claim Posix
compliance.  Of course, having a less-buggy Posix layer would have been
really helpful...

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Wavelength to RGB converter?
Date: 6 Mar 2003 17:12:05
Message: <3e67c7b5@news.povray.org>
In article <3e672bb9@news.povray.org> , Warp <war### [at] tagpovrayorg>  wrote:

>   From the point of view of applications, they don't see any difference
> between files, hard or soft links (unless the specifically ask the system
> with a specialized system call).

Of course not.  After all, otherwise they would be useless.  Which is pretty
much what they are in Windos unless you want to start applications from your
desktop or the Start mess.

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Wavelength to RGB converter?
Date: 6 Mar 2003 17:15:30
Message: <3e67c882$1@news.povray.org>
In article <cja### [at] netplexaussieorg> , 
Christopher James Huff <cja### [at] earthlinknet>  wrote:

>>   From the point of view of applications, they don't see any difference
>> between files, hard or soft links (unless the specifically ask the system
>> with a specialized system call).
>
> I don't know if aliases are implemented like this. An attempt to open an
> alias with the standard C code may attempt to open the actual alias
> file, not its target. To properly written Mac programs they behave like
> the target itself would, though.

Only from the Unix layer in Mac OS X (which end-user applications aren't
supposed to use).  For it an alias file cannot be seen because alias data is
stored in the resource fork.  The solution is not to use gcc but a
professional compiler with a reasonable runtime and C library, which on Mac
OS X means CodeWarrior (for C and C++ programs).

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Ian J  Burgmyer
Subject: Re: Wavelength to RGB converter?
Date: 6 Mar 2003 23:37:51
Message: <3e68221f$1@news.povray.org>
Thorsten Froehlich's furious key-hammering produced this:
>> NTFS.
> 
> I know that NTFS supports them. It had to so M$ could claim Posix
> compliance.

Basically, yes.  Microsoft seems to have dumped POSIX compliance (it's not in
either XP release).  I'm not sure if it will be included in .NET Server 2003 but
I highly doubt it.

I could personally care less.  I'd rather have cygwin anyway. :)

Follow-ups set to povray.off-topic.

-- 
/*^*/light_source{100*<-5,2,-5>2}#macro I(i,n)#while(strlen(i)>=n)#local A=asc(
substr(i,n,1));#local a=asc(substr(i,n+1,1));cylinder{<div(A,8)-12,mod(A,8)-4,4
><div(a,8)-12,mod(a,8)-4,4>,0.1pigment{rgb z}}#local n=n+2;#end#end I("ScUe[]"1
/*<*/)I("mkmtlttk"1)//@_$#!,:<"Thhis polysig brought to you by Ian Burgmyer :)"


Post a reply to this message

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