Changes between Version 3 and Version 4 of SphericalHarmonics


Ignore:
Timestamp:
Aug 31, 2020, 4:24:49 PM (6 years ago)
Author:
goddard
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SphericalHarmonics

    v3 v4  
    1717def spherical_surface(session,
    1818                      radius_function,
     19                      move = None,      # a Place instance to rotate and translate surface
    1920                      theta_steps = 100,
    2021                      phi_steps = 50,
     
    5354    ta = array(triangles, int32)
    5455
     56    # Rotate and translate vertices to a new location.
     57    if move is not None:
     58        move.transform_points(va, in_place = True)
     59       
    5560    # Compute average vertex normal vectors
    5661    from chimerax.surface import calculate_vertex_normals
     
    7479    return 0.25*sqrt(15/(2*pi)) * sin(phi)**2 * cos(2*theta)
    7580
     81from chimerax.geometry import translation
     82
    7683# Create 3 surfaces
    7784spherical_surface(session, y20_re)
    78 
    79 s1 = spherical_surface(session, y21_re)
    80 from chimerax.geometry import translation
    81 s1.position = translation((1,0,0))
    82 
    83 s2 = spherical_surface(session, y22_re)
    84 s2.position = translation((2,0,0))
     85spherical_surface(session, y21_re, move = translation((1,0,0)) )
     86spherical_surface(session, y22_re, move = translation((2,0,0)) )
    8587
    8688}}}