POV-Ray : Newsgroups : povray.newusers : Combining thousands of smooth_triangles into an object : Re: Combining thousands of smooth_triangles into an object Server Time
29 Jul 2024 06:25:03 EDT (-0400)
  Re: Combining thousands of smooth_triangles into an object  
From: Charles C
Date: 23 May 2006 14:55:00
Message: <web.44735958f7c3fdecb160ffde0@news.povray.org>
One way is you can wrap a union around your include file as follows:

#declare Protein_1 = union {   #include "Bunch_O_Triangles.inc"  }
object{Protein_1  rotate <?,?,?> translate <?,?,?>  }

You might consider using your editor to do a search and replace-all for all
those texture statements, if they're all the same, and replace them with
nothing or a whitespace character... and then just apply one copy of the
texture to the union or the object.

"Nigo" <hej### [at] hotmailcom> wrote:
> Hi there
>
> I'm trying to generate a picture with two proteins (two seperate *.pov and
> *.inc files) obtained from swiss pdb-viewer.
>
> The proteinstructures are defined by thousands of smooth_triangles in the
> form
>
> smooth_triangle
>
{<19.880,-14.362,-31.678><-0.568,0.536,-0.625>,<19.909,-14.498,-31.821><-0.568,0.536,-0.625>,<19.999,-14.413,-31.830>
<-
> 0.568,0.536,-0.625>texture{pigment{
> colour red 1.00 green 1.00 blue 1.00} finish{ RIBBON_FINISH }}}
> smooth_triangle
>
{<19.880,-14.362,-31.678><-0.568,0.536,-0.625>,<19.999,-14.413,-31.830><-0.568,0.536,-0.625>,<20.043,-14.309,-31.780>
<-
> 0.568,0.536,-0.625>texture{pigment{
> colour red 1.00 green 1.00 blue 1.00} finish{ RIBBON_FINISH }}}
> smooth_triangle
>
{<19.880,-14.362,-31.678><-0.568,0.536,-0.625>,<20.043,-14.309,-31.780><-0.568,0.536,-0.625>,<20.025,-14.225,-31.691>
<-
> 0.568,0.536,-0.625>texture{pigment{
> colour red 1.00 green 1.00 blue 1.00} finish{ RIBBON_FINISH }}}
> smooth_triangle
>
{<19.880,-14.362,-31.678><-0.568,0.536,-0.625>,<20.025,-14.225,-31.691><-0.568,0.536,-0.625>,<19.951,-14.193,-31.597>
<-
> 0.568,0.536,-0.625>texture{pigment{
> colour red 1.00 green 1.00 blue 1.00} finish{ RIBBON_FINISH }}}
>
> ..... but they are not defined as an object, so I can't use a
> transform/translate command to position them. If I include both proteins in
> the same pov-file they will be positioned on top of each other, which is not
> pretty ;-)
>
> I've tried enclosing each protein in a mesh with:
> #declare A0_shape=mesh{
> all the smooth_triangles...
> }
>
> but it doesn't work :-( How do I enclose each protein in it own object so I
> can position them relative to each other?
>
> Best regards,
> Nigo


Post a reply to this message

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