 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <1fr4a7h.44sdcb1jqm0yuN%kaveh@delete_this.focalimage.com>,
kav### [at] delete_this focalimage com (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] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Christopher James Huff <cja### [at] earthlink net> wrote:
> In article <1fr4a7h.44sdcb1jqm0yuN%kaveh@delete_this.focalimage.com>,
> kav### [at] delete_this focalimage com (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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Sat, 1 Mar 2003 11:01:42 +0000
kav### [at] delete_this focalimage com (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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Jaime Vives Piqueres <jai### [at] ignorancia org> wrote:
> On Sat, 1 Mar 2003 11:01:42 +0000
> kav### [at] delete_this focalimage com (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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Sat, 1 Mar 2003 15:49:27 +0000
kav### [at] delete_this focalimage com (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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Jaime Vives Piqueres wrote:
>
> On Sat, 1 Mar 2003 15:49:27 +0000
> kav### [at] delete_this focalimage com (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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
William F. Pokorny <pok### [at] attglobal net> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Sat, 01 Mar 2003 13:40:51 -0500
"William F. Pokorny" <pok### [at] attglobal net> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Jaime Vives Piqueres <jai### [at] ignorancia org> wrote:
> On Sat, 1 Mar 2003 15:49:27 +0000
> kav### [at] delete_this focalimage com (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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Mon, 3 Mar 2003 00:38:39 +0000
kav### [at] delete_this focalimage com (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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3e64207d$1@news.povray.org> , "Ian J. Burgmyer"
<the### [at] mac com> 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] povray org
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3e646317$1@news.povray.org>,
"Thorsten Froehlich" <tho### [at] trf de> 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] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <cja### [at] netplex aussie org> ,
Christopher James Huff <cja### [at] earthlink net> 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] trf de
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <cja### [at] netplex aussie org> ,
Christopher James Huff <cja### [at] earthlink net> 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] trf de
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Ian J. Burgmyer <the### [at] mac com> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Tue, 4 Mar 2003 17:55:53 +0000
kav### [at] delete_this focalimage com (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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3e64aa31$1@news.povray.org>,
"Thorsten Froehlich" <tho### [at] trf de> 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] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3e655440@news.povray.org>,
"Ian J. Burgmyer" <the### [at] mac com> 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] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <cja### [at] netplex aussie org> ,
Christopher James Huff <cja### [at] earthlink net> 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] trf de
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Jaime Vives Piqueres <jai### [at] ignorancia org> wrote:
> On Tue, 4 Mar 2003 17:55:53 +0000
> kav### [at] delete_this focalimage com (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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Kaveh" <kav### [at] delete_this focalimage com> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Wed, 5 Mar 2003 12:59:32 -0000
"Tom Melly" <tom### [at] tomandlu co uk> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3e65f4b3$1@news.povray.org>,
"Tom Melly" <tom### [at] tomandlu co uk> 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] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Christopher James Huff" <cja### [at] earthlink net> wrote in message
news:cja### [at] netplex aussie org...
<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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thorsten Froehlich <tho### [at] trf de> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3e672bb9@news.povray.org>, Warp <war### [at] tag povray org>
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] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Christopher James Huff <cja### [at] earthlink net> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3e67773b@news.povray.org>, Warp <war### [at] tag povray org>
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] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3e66b61e$1@news.povray.org> , "Ian J. Burgmyer"
<the### [at] mac com> 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] trf de
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3e672bb9@news.povray.org> , Warp <war### [at] tag povray org> 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] trf de
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <cja### [at] netplex aussie org> ,
Christopher James Huff <cja### [at] earthlink net> 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] trf de
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |