POV-Ray : Newsgroups : povray.newusers : Am I being stupid or is this an bug? Server Time
25 Nov 2024 01:47:21 EST (-0500)
  Am I being stupid or is this an bug? (Message 1 to 5 of 5)  
From: Hugo
Subject: Am I being stupid or is this an bug?
Date: 8 Jan 2007 23:15:00
Message: <web.45a314fb2ae0b0adf12e35320@news.povray.org>
I am trying to model a protein
[url=http://www.pdb.org/pdb/explore.do?structureId=1QYS] Top7 [/url]

It has about 600 atoms in it but I have two atoms that Pov-ray for Windows
3.6 errors out with a Parse Error: Expected 'numeric expression', > found
instead.

The truncated version of the file with the two errors lines (the other 600
odd work fine)

[code]
#include "colors.inc"

// camera
//#declare CamPos = <0.0, 2.0, -100.0>;
#declare CamPos = <0.0, 2.0, -70.0>;
camera {
  location  CamPos
  look_at   <0.0, 0.0,  0.0>
  right     x*image_width/image_height
}

// Light
// An area light (creates soft shadows)
// WARNING: This special light can significantly slow down rendering times!
light_source {
  0*x                 // light's position (translated below)
  color rgb 1.0       // light's color
  area_light
  <8, 0, 0> <0, 0, 8> // lights spread out across this distance (x * z)
  4, 4                // total number of lights in grid (4x*4z = 16 lights)
  adaptive 0          // 0,1,2,3...
  jitter              // adds random softening of light
  circular            // make the shape of the light circular
  orient              // orient light
  translate <40, 80, -40>   // <x y z> position of light
}

   background { White }



// element colours
#declare C_colour = Black;
#declare N_colour = LightBlue;
#declare O_colour = Blue;
#declare Se_colour = Gold;

// element sizes
#declare C_size = .8;
#declare N_size = .8;
#declare O_size = .8;
#declare Se_size = .8;

// elements

#declare C_atom =
      sphere   { <0,0,0> C_size
         pigment  {
            colour  C_colour
                  }

            finish   {
               phong .75
               phong_size 25
                     }

               }


#declare N_atom =
      sphere   { <0,0,0> N_size
         pigment  {
            colour  N_colour
                  }
            finish   {
               phong .75
               phong_size 25
                     }
      }

#declare O_atom =
      sphere   { <0,0,0> O_size
         pigment  {
            colour  O_colour
                  }
         finish   {
               phong .75
               phong_size 25
                     }
      }

      #declare Se_atom =
      sphere   { <0,0,0> Se_size
         pigment  {
            colour  Se_colour
                  }
         finish   {
               phong .75
               phong_size 25
                     }
      }

declare top7 =
// What is wrong with this line ?
object {O_atom translate < 7.395 -3.014 -0.605> }
// What is wrong with this line ?

// What is wrong with this line ?
 object {O_atom translate < 3.225  -5.258  -1.112> }
// What is wrong with this line ?


object {top7}
[/code]

Does this error out anybody else?

My computer has 1G memory so that shouldn't be a problem?

It is running Rosetta@Home, but that shouldn't do anything surely, and the
usual array of AVG, Google desktop, Asus Probe, HDD Health etc...

If I change the last number of the last translate to a whole number it will
render it OK, but is sort of pointsless as it's supposed to be within the
protein.

Thanks for reading this far, even more thanks if you can help.

Hugo


Post a reply to this message

From: Slime
Subject: Re: Am I being stupid or is this an bug?
Date: 8 Jan 2007 23:32:57
Message: <45a31af9@news.povray.org>
> object {O_atom translate < 7.395 -3.014 -0.605> }

You have no commas in the translate vector, so it thinks the minus signs are
subtraction and it thinks you have a vector with only one number in it.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Hugo
Subject: Re: Am I being stupid or is this an bug?
Date: 8 Jan 2007 23:55:00
Message: <web.45a31f88d6f7125840894e10@news.povray.org>
"Slime" <fak### [at] emailaddress> wrote:
> > object {O_atom translate < 7.395 -3.014 -0.605> }
>
> You have no commas in the translate vector, so it thinks the minus signs are
> subtraction and it thinks you have a vector with only one number in it.
>
>  - Slime
>  [ http://www.slimeland.com/ ]

Thank you very much.

It's amazing I got away with no errors for the other 600 odd atoms.

I think I will add commas to all of them, as a couple of them don't really
look like they are in the right position, so I probably screwed these up as
well.

Thanks once again,

Hugo


Post a reply to this message

From: Warp
Subject: Re: Am I being stupid or is this an bug?
Date: 9 Jan 2007 03:15:11
Message: <45a34f0f@news.povray.org>
Hugo <nomail@nomail> wrote:
> It's amazing I got away with no errors for the other 600 odd atoms.

  <1 -2 3> is equivalent to <-1, 3>, which is equivalent to <-1, 3, 0>
which is a valid vector and thus you won't get an error.

  <1 -2 -3> is equivalent to <-4> which is not a valid vector and thus
you got the error.

  Always use commas to avoid this kind of mixup. (There's a good reason
to support values without commas, but that's a different story.)

-- 
                                                          - Warp


Post a reply to this message

From: Hugo
Subject: Re: Am I being stupid or is this an bug?
Date: 9 Jan 2007 20:50:00
Message: <web.45a444bcd6f7125d5bf604f0@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> Hugo <nomail@nomail> wrote:
> > It's amazing I got away with no errors for the other 600 odd atoms.
>
>   <1 -2 3> is equivalent to <-1, 3>, which is equivalent to <-1, 3, 0>
> which is a valid vector and thus you won't get an error.
>
>   <1 -2 -3> is equivalent to <-4> which is not a valid vector and thus
> you got the error.
>
>   Always use commas to avoid this kind of mixup. (There's a good reason
> to support values without commas, but that's a different story.)
>
> --
>                                                           - Warp

Thanks for the information, I won't ask about the different story :o

My protein is much better now, I did a count it has 693 atoms in it, well no
I didn't, the PDB has this information at the bottom, but you know what I
mean.


Post a reply to this message

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