|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
From: Warp
Subject: Re: Combining thousands of smooth_triangles into an object
Date: 23 May 2006 14:50:48
Message: <44735988@news.povray.org>
|
|
|
| |
| |
|
|
Nigo <hej### [at] hotmailcom> wrote:
> I've tried enclosing each protein in a mesh with:
> #declare A0_shape=mesh{
> all the smooth_triangles...
> }
> but it doesn't work
What do you mean it doesn't work?
--
- Warp
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
From: Chris B
Subject: Re: Combining thousands of smooth_triangles into an object
Date: 23 May 2006 14:57:08
Message: <44735b04@news.povray.org>
|
|
|
| |
| |
|
|
"Nigo" <hej### [at] hotmailcom> wrote in message
news:web.44734e3cef466b7415265f240@news.povray.org...
> 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
> ... snip ...
> ..... 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
>
Hi Nigo,
According to the documentation, this form of texture definition isn't
supported by the mesh object, which requires textures to be declared before
using them in this context.
A simple workaround is to declare the object as a union of the individual
smooth triangles whereupon it doesn't complain about the inline texture
definition. (see the following example)
Where you said "but it doesn't work". It would have been better if you'd
have listed the error message as the problem would have been quicker to
diagnose.
Regards,
Chris B.
camera {location <0,0,-2> look_at 0}
light_source { <0, 50, 0> color 1}
#declare RIBBON_FINISH = finish {phong 0.5}
#declare MyShape = union {
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 }}}
}
object {MyMesh translate <-19.880,14.362,31.678> scale 2}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thanx guys... declaring the whole inc-file as a union worked fine. Must
admit I havn't tried the other tips, but I'm looking through them and
again... thanx
/Nigo
"Charles C" <nomail@nomail> wrote:
> 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.83
0>
> <-
> > 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.78
0>
> <-
> > 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.69
1>
> <-
> > 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.59
7>
> <-
> > 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
|
|
| |
| |
|
|
|
|
| |
|
|