simple Povray import

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 15/02/2003 at 17:02, xxxxxxxx wrote:

Hi everyone.
i use a scientific program in college that outputs to the Povray format. (we're not talking complex scenes with lights, radiosity etc here). here is an example of the object i need to import into c4d:
--
#declare Bol = sphere {<0, 0, 0>, .5 }
 
#declare Segment = object {Bol}
 
#declare ouritem =
   union {
              object {Segment
                          scale <0.983, 0.983, 0.983>
                          rotate <-27, 0, 19>
                          translate <-0.213, 0.246, 0.301>
                         }
              object {Segment
                           scale <0.967, 0.967, 0.967>
                           rotate <-24, 0, 23>
                           translate <-0.464, 0.488, 0.563>
                         }
}
object {ouritem
             texture {pigment { color rgbf <0.9882,0.9020,0.7882,0>} scale <1,1,1> rotate <0,0,0>}
             scale <1, 1, 1>
             rotate <0, 4, 0>
            translate <0, 0, 0>
            no_shadow
 }
--
would it be possible to write a coffee script to parse this file? it should be easy, as the pov-files i use only use spheres, cubes, torus, cones etc. or is what i'm asking a HUGE exercise, and i'm better off trying to program a plugin using c++?
does anyone fancy having a go? should be an interesting evening exercise for someone experienced 🙂