POV-Ray : Newsgroups : povray.newusers : Writing "Include" files Server Time
4 Nov 2024 13:03:42 EST (-0500)
  Writing "Include" files (Message 1 to 8 of 8)  
From: Modeler
Subject: Writing "Include" files
Date: 6 Mar 2003 18:30:06
Message: <web.3e67d928ba5e8fc81117d57d0@news.povray.org>
If anyone could point me in the right direction for learning to write
"Include" files it would be greatly appreciated. I would like to locate
tutorials, info, or anything else that would help me.

Thanks

Modeler


Post a reply to this message

From: Warp
Subject: Re: Writing "Include" files
Date: 6 Mar 2003 18:39:31
Message: <3e67dc33@news.povray.org>
Modeler <nomail@nomail> wrote:
> If anyone could point me in the right direction for learning to write
> "Include" files it would be greatly appreciated. I would like to locate
> tutorials, info, or anything else that would help me.

  What do you mean by "include files"? What do you want to do? Do you
have anything specific in your mind?

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

From: Ian J  Burgmyer
Subject: Re: Writing "Include" files
Date: 6 Mar 2003 23:33:32
Message: <3e68211c@news.povray.org>
Modeler's furious key-hammering produced this:
> If anyone could point me in the right direction for learning to write
> "Include" files it would be greatly appreciated. I would like to locate
> tutorials, info, or anything else that would help me.

POV-Ray's include files are the same thing as scene files.  Their biggest
advantage over simply throwing the code into your scene is that it enables you
to reuse the code without having to copy-and-paste it into every file that you
do.  The only real difference between include files and scene files is the file
extension (the file is marked with a ".inc" ending rather than ".pov").

-- 
/*^*/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: Leroy Whetstone
Subject: Re: Writing "Include" files
Date: 8 Mar 2003 02:09:45
Message: <3E69B0A4.26CBFCA9@joplin.com>
This may not help you. But you don't have to to use 'inc' or 'pov' as a file
file attribute. Any three letters will do. I use 'prm' to denote a prism file
and
'pol', 'sor', 'lat', for polygons, surface of revolutions, and lathe objects.
the main thing is if you use your own file attribute names is to be constant.


--
Have Fun!


Post a reply to this message

From: Modeler
Subject: Re: Writing "Include" files
Date: 8 Mar 2003 11:40:03
Message: <web.3e6a12e6df4f0a049be292730@news.povray.org>
Thanks for the quick responses, and I'm sorry I wasn't clear enough.

What I want to do is create an asteroid field(asteroidfield.inc), using some
objects(asteroids) I've created, so that I can use asteroidfield.inc in
space scenes.

Right now I have eight(8) asteroid objects, but I would like to use just one
object with random scaling, positioning, rotation, and shape(if random
shapes are possible).

Here is my main question;
Once I have the asteroid field scene prepared do I just save as an .inc
file to use in space scenes?

Any info or tutorials that might explain how to accomplish this would be
very appreciated.

Thanks again,
Modeler


Post a reply to this message

From: KalleK
Subject: Re: Writing "Include" files
Date: 8 Mar 2003 15:59:08
Message: <3e6a599c$1@news.povray.org>
Hi!

> Here is my main question;
> Once I have the asteroid field scene prepared do I just save as an
> .inc file to use in space scenes?

and then write '#include "ast_field.inc"' or whatever... in your space scene.

Should do it, but maybe you should comment out camera and light_sources which
you used for testing the field. Otherwise you will have at least some
additional, unwanted lights in your scene.
(If your include statement comes before the camera statment of the scene,
then your asteroid-field-camera will be overridden, but better comment it
out, too.)

Kalle


Post a reply to this message

From: Ian J  Burgmyer
Subject: Re: Writing "Include" files
Date: 9 Mar 2003 03:24:25
Message: <3e6afa39$1@news.povray.org>
>> Once I have the asteroid field scene prepared do I just save as an
>> .inc file to use in space scenes?
> 
> and then write '#include "ast_field.inc"' or whatever... in your space scene.

Also, if you want to be able to use the file in any scene without having to
worry about "ast_field.inc" (or whatever you call it) is in the same directory,
save the include file in your POV-Ray include file directory (probably
C:\Program Files\POV-Ray for Windows 3.5\Include" if you're using Windows).

-- 
/*^*/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: Modeler
Subject: Re: Writing "Include" files
Date: 9 Mar 2003 14:45:03
Message: <web.3e6b99b1df4f0a04bd2c8d680@news.povray.org>
Thanks KalleK and Ian. I really appreciate the help.

Modeler


Post a reply to this message

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