3. surface_from_GaussCurv

Solve K(u,v)= -phi_uu/phi numerically for phi, given K(u,v). For surfaces of revolution K(u,v)=K(u).

NOTE: u is the meridian’s geodesic length
v is the parralel’s geodesic length

3.1. Overview

3.2. Classes and Functions

surface_from_GaussCurv.geodesic_circle_from_meridian(phi, phidot, z, t, start_eta=0.0, end_eta=1.5707963267948966, n_etasteps=50, start_tt=0.0, end_tt=1.0, n_ttsteps=500)[source]

Using meridian as information, create a geodesic disc, emanating out to a geodesic radius. Emanate geodesics from origin (but may begin geodesic some distance start_tt from origin), terminating the paths at a geodesic length (radius) of end_tt. Emanate these in (# n_etasteps) directions evenly spaced in angle from start_eta to end_eta.

Parameters:

geodesic_diffeq : function

the function to integrate via odeint to get the geodesics in R3

start_eta : float

starting angle to sweep out with geodesics from origin to geodesic circle

end_eta : float

final angle in radians, inclusive

n_etasteps : int

number of geodesics to emanate between start_eta and end_eta, inclusive

start_tt : float

initial geodesic distance of emanating geodesics

end_tt : float

final geodesic distance of emanating geodesics

n_ttsteps : int

number of path length increments to integrate along during emanation

surface_from_GaussCurv.geodesic_circle_from_meridian_and_display(phi, phidot, z, t, surf, start_eta=0.0, end_eta=1.5707963267948966, n_etasteps=50, start_tt=0.0, end_tt=1.0, n_ttsteps=500, maxN4surface=200)[source]

Using meridian as information, create a geodesic disc, emanating out to a geodesic radius, then display images of the surface. Emanate geodesics from origin (but may begin geodesic some distance start_tt from origin), terminating the paths at a geodesic length (radius) of end_tt. Emanate these in (# n_etasteps) directions evenly spaced in angle from start_eta to end_eta.

Parameters:

geodesic_diffeq : function

the function to integrate via odeint to get the geodesics in R3

phi_interp : interpolation

interpolation of phi (the radius of the surface of revolution as function of pathlength t, along meridian)

surf : string

name of the surface (example: ‘QGP’ or ‘PseudoS’)

start_eta : float

starting angle to sweep out with geodesics from origin to geodesic circle

end_eta : float

final angle in radians, inclusive

n_etasteps : int

number of geodesics to emanate between start_eta and end_eta, inclusive

start_tt : float

initial geodesic distance of emanating geodesics

end_tt : float

final geodesic distance of emanating geodesics

n_ttsteps : int

number of path length increments to integrate along during emanation

maxN4surface : int

puts a limit on the number of geodesics drawn in plots, to avoid slow-down in plotting

surface_from_GaussCurv.geodesic_circle_from_meridian_and_savefiles(phi, phidot, z, t, surf, goutdir, Ginterp, start_eta=0.0, end_eta=1.5707963267948966, n_etasteps=50, start_tt=0.0, end_tt=1.0, n_ttsteps=500, maxN4surface=200)[source]

Using meridian as information, create a geodesic disc, emanating out to a geodesic radius, then save the file and images of the surface. Emanate geodesics from origin (but may begin geodesic some distance start_tt from origin), terminating the paths at a geodesic length (radius) of end_tt. Emanate these in (# n_etasteps) directions evenly spaced in angle from start_eta to end_eta.

Parameters:

geodesic_diffeq : function

the function to integrate via odeint to get the geodesics in R3

surf : string

name of the surface (example: ‘QGP’ or ‘PseudoS’)

goutdir : string

path to directory for storing geodesic circle info and images

start_eta : float

starting angle to sweep out with geodesics from origin to geodesic circle

end_eta : float

final angle in radians, inclusive

n_etasteps : int

number of geodesics to emanate between start_eta and end_eta, inclusive

start_tt : float

initial geodesic distance of emanating geodesics

end_tt : float

final geodesic distance of emanating geodesics

n_ttsteps : int

number of path length increments to integrate along during emanation

maxN4surface : int

puts a limit on the number of geodesics drawn in plots, to avoid slow-down in plotting

surface_from_GaussCurv.halfsurface_from_first_quadrant(Phix, Phiy, Psi)[source]

Use xyz points defined on first xy quadrant to create surface on first and second quadrants of xy.

Parameters:

Phix : NxM array

component of points measuring distance along x axis, N rows are of each geodesic emanating out, sampled at M points

Phiy : NxM array

component of points measuring distance along y axis, N rows are of each geodesic emanating out, sampled at M points

Psi : NxM array

component of points measuring distance along z axis, N rows are of each geodesic emanating out, sampled at M points

Returns:

xyz : N*M x 3 array

the surface on all 4 quadrants

surface_from_GaussCurv.integrate_meridian(Ginterp, start_t=0.0, end_t=1.0, n_tsteps=1000)[source]

Using an interpolation of G defined along the meridian, integrate the geodesic line of revolution from start_t to ent_t, evaluated at n_tsteps.

Parameters:

Ginterp : interp1d object

interpolation of Gaussian curvature defined along the meridian

start_t : float

starting geodesic distance along meridian on which to integrate

end_t : float

ending geodesic distance along meridian on which to integrate

n_tsteps : int

number of steps to integrate over on meridian

Returns:

phi : array

radius of neck (not radius of curvature)

phidot : array

derivative of phi with respect to geodesic/arc length t

z : array

height along axis of rotation

G : array

numerically computed Gaussian curvature from resulting approx to meridian

t : array

path length along geodesic (meridian)

dt : float

step size along path

surface_from_GaussCurv.integrate_meridian_and_savefiles(Ginterp, outdir, infostring, viewer=0, start_t=0.0, end_t=1.0, n_tsteps=1000)[source]

Save results of meridian in outdir, using built-in naming conventions.

Parameters:

Ginterp : interp1d object

interpolation of Gaussian curvature defined along the meridian

outdir : string

path to output directory

infostring : string

description of the surface

viewer : int

if nonzero, plots will appear interactively as quantities are computed

start_t : float

starting geodesic distance along meridian on which to integrate

end_t : float

ending geodesic distance along meridian on which to integrate

n_tsteps : int

number of steps to integrate over on meridian

Returns:

phi : array

radius of neck (not radius of curvature)

phidot : array

derivative of phi with respect to geodesic/arc length t

z : array

height along axis of rotation

G : array

numerically computed Gaussian curvature from resulting approx to meridian

t : array

path length along geodesic (meridian)

dt : float

step size along path

surface_from_GaussCurv.phi_diffeq_numericG(XX, t, Gintrp)[source]

Solve K(u,v) = -phi_uu/phi for phi along geodesic distance interval t.

Parameters:

XX : array of dimension Nx1

phi initial, phidot initial, z initial

t : float

the distance along u, as linspace or nx1 array

Returns:

phidot,phidotdot,zdot : array of dimension #bonds x 1

Derivatives of phi

surface_from_GaussCurv.surface_by_rotating_meridian(phi, phidot, z, t, start_tt=0.0, end_tt=1.0, n_ttsteps=100, v_steps=1500)[source]

Use meridian geodesic to define surface revolved about the axis of rotation. The z-axis is redefined as the normal to the neck/origin of the surface of revolution.

Parameters:

phi : array

radius of neck (not radius of curvature)

phidot : array

derivative of phi with respect to geodesic/arc length t

z : array

height along axis of rotation

t : array

path length along geodesic (meridian)

outdir : string

path to output directory

infostring : string

description of the surface

viewer : int

if nonzero, plots will appear interactively as quantities are computed

start_tt : float

starting geodesic distance along meridian on which to integrate

end_tt : float

ending geodesic distance along meridian on which to integrate

n_ttsteps : int

number of steps to integrate over on meridian

Returns:

x,y,z : len(tt)*len(vt) x 1 arrays

positions of points on the surface, along geodesics extending from start_tt to end_tt, and from v=(0,pi)

surface_from_GaussCurv.surface_by_rotating_meridian_and_display(phi, phidot, z, t, outdir, infostring, start_tt=0.0, end_tt=1.0, n_ttsteps=100, v_steps=1500)[source]

Use meridian geodesic to define surface revolved about the axis of rotation, and display plots of sparse versions of the surfaces. The z-axis is redefined as the normal to the neck/origin of the surface of revolution. Saves images of a sparse version of the resulting mesh.

Parameters:

phi : array

radius of neck (not radius of curvature)

phidot : array

derivative of phi with respect to geodesic/arc length t

z : array

height along axis of rotation

t : array

path length along geodesic (meridian)

start_tt : float

starting geodesic distance along meridian on which to integrate

end_tt : float

ending geodesic distance along meridian on which to integrate

n_ttsteps : int

number of steps to integrate over on meridian

Returns:

x,y,z : len(tt)*len(vt) x 1 arrays

positions of points on the surface, along geodesics extending from start_tt to end_tt, and from v=(0,pi)

surface_from_GaussCurv.surface_by_rotating_meridian_and_savefiles(phi, phidot, z, t, outdir, infostring, viewer=0, start_tt=0.0, end_tt=1.0, n_ttsteps=100, v_steps=1500)[source]

Use meridian geodesic to define surface revolved about the axis of rotation, and save data plots of spare data. The z-axis is redefined as the normal to the neck/origin of the surface of revolution. Saves images of a sparse version of the resulting mesh.

Parameters:

phi : array

radius of neck (not radius of curvature)

phidot : array

derivative of phi with respect to geodesic/arc length t

z : array

height along axis of rotation

t : array

path length along geodesic (meridian)

outdir : string

path to output directory

infostring : string

description of the surface

viewer : int

if nonzero, plots will appear interactively as quantities are computed

start_tt : float

starting geodesic distance along meridian on which to integrate

end_tt : float

ending geodesic distance along meridian on which to integrate

n_ttsteps : int

number of steps to integrate over on meridian

Returns:

x,y,z : len(tt)*len(vt) x 1 arrays

positions of points on the surface, along geodesics extending from start_tt to end_tt, and from v=(0,pi)

surface_from_GaussCurv.surface_from_first_quadrant(Phix, Phiy, Psi)[source]

Use xyz points defined on first xy quadrant to create surface on all four quadrants of xy.

Parameters:

Phix : NxM array

component of points measuring distance along x axis, N rows are of each geodesic emanating out, sampled at M points

Phiy : NxM array

component of points measuring distance along y axis, N rows are of each geodesic emanating out, sampled at M points

Psi : NxM array

component of points measuring distance along z axis, N rows are of each geodesic emanating out, sampled at M points

Returns:

xyz : N*M x 3 array

the surface on all 4 quadrants