POV-Ray : Newsgroups : povray.general : POV to Indigo Using File IO : Re: POV to Indigo Using File IO Server Time
30 Jul 2024 22:25:11 EDT (-0400)
  Re: POV to Indigo Using File IO  
From: Dave Dunn
Date: 7 May 2008 13:15:00
Message: <web.4821e25c759ee3438465caf0@news.povray.org>
/* This will at least create a correct Indigo sphere definition :) Note that the
color name in the macro is in quotes. This is because Indigo requires a name for
its materials. I could have used a dummy, but what the heck. */

#version 3.6;
#include "colors.inc"

camera {
  location  <0, .5, -4>
  look_at   0
}

light_source {
  <0, 10, -20>
  color White
}

#macro Sphere (X,Y,Z, Radius, Pigment,R,G,B)

sphere {
<X,Y,Z>,
Radius
pigment {rgb <R,G,B>}
}

#fopen File "Testfile.txt" write
#write ( File,
"<sphere>
<material> <name>", Pigment,"</name>
<diffuse>
<colour>",R,",",G,",",B,"</colour>
</diffuse>
</material>
<center>", ,X,",",Y,",",Z, "</center>
<radius>",Radius,"</radius>
</sphere>")

#end

Sphere (0,0,0,1,"Red",1,0,0)


Post a reply to this message

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