Changeset 1074cb


Ignore:
Timestamp:
Feb 10, 2010, 2:47:24 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
850e50
Parents:
2bc06b
Message:

NanoCreator - radius in Tube section is now outside of loop.

Signed-off-by: Frederik Heber <heber@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • util/src/NanoCreator.c

    r2bc06b r1074cb  
    14221422      halfaxis[i] = factors[0]*Norm(Tubevector[axis[0]])/Norm(Tubevector[i]);
    14231423
    1424     double arg, radius;
     1424    double arg;
     1425    const double radius = 1./(2.*M_PI);  // is length of sheet in units of axis vector, divide by pi to get radius (from circumference)
    14251426    for (i=0;i<numbersheet;i++) {
    14261427      // scan next atom
     
    14351436      // roll up (project (x,y,z) on cylindrical coordinates (radius,arg,z))
    14361437      arg = 2.*M_PI*x[axis[0]]/(factors[0]) - M_PI;  // is angle
    1437       radius = 1./(2.*M_PI);  // is length of sheet in units of axis vector, divide by pi to get radius (from circumference)
    14381438      // fprintf(stdout, "arg: %5.2f (c%2.2f,s%2.2f)\t",$arg, cos($arg), sin($arg));
    14391439      x[axis[0]] = cos(arg)*halfaxis[axis[0]]*(radius+x[axis[2]]/halfaxis[axis[2]]); // as both vectors are not normalized additional betrag has to be taken into account!
Note: See TracChangeset for help on using the changeset viewer.