3D Geometry Annotating Python Program Documentation
3D Geometry Annotating Python Program Documentation
in 3D Documentation
GS Simulation
1 Examples 1
1.1 get_tilt_angle_full.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 tetra_premise_1.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 lemma4_fig4.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 gyrologodraw10.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.5 Case_C_omega_noise_fig.tex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.6 TeX group logo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.7 tetrahedron midsphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.8 tetrahedron circumscribed sphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Available Functions 5
i
ii
CHAPTER
ONE
EXAMPLES
1.1 get_tilt_angle_full.py
../../../figure_2_af_resized_powered.PNG
File to create this graph should be in the get_tilt_angle_full.py files. Need to isolate the drawing part.
1.2 tetra_premise_1.py
1
Common geometry drawing functions in 3D Documentation
𝐵 a
𝐸 𝐶
𝐻
𝐽
𝑁 𝐹
𝐴 𝐾 𝑁′
𝐺
𝐷
2 Chapter 1. Examples
Common geometry drawing functions in 3D Documentation
1.3 lemma4_fig4.py
1.4 gyrologodraw10.py
1.5 Case_C_omega_noise_fig.tex
In ./otherstuff/data_text_files/
In ./drawing_code/latex/logos_creation/tex_group_logo.tex
1.3. lemma4_fig4.py 3
Common geometry drawing functions in 3D Documentation
./figures/tex_group_logo.pdf
4 Chapter 1. Examples
CHAPTER
TWO
AVAILABLE FUNCTIONS
px = np.array([1,0,0])
pA = np.array([0.5,0.5,0.5])
n_vec = np.cross(px/np.linalg.norm(px),pA/np.linalg.norm(pA))
arc_alpha = 0.3*tool.circle_arc(n_vec,px,pA,20)
larc_alpha, = ax2.plot(arc_alpha[:,0],arc_alpha[:,1],arc_alpha[:,2],'r',lw=2)
v1 = np.array([1,0,0])
n_vec = np.array([0,0,1])
circle1 = circle_full(n_vec,v1,0.3,20) + circle_center
circle1, = ax2.plot(circle1[:,0],circle1[:,1],circle1[:,2],'r',lw=2)
5
Common geometry drawing functions in 3D Documentation
annotate_program.draw_xyz_coordinate_unit_vectors(ax4)
Put xyz coordinate unit vectors with fancy arrows. See figure in circle_arc.
annotate_program.four_points_circle(p1, p2, p3, p4)
Return center and radius of a sphere suscribing four points p1~4.
annotate_program.incircle3D(point1, point2, point3)
Return the insubscribed circle’s center’s position pO, radius r and norm vec nv and three Ceva sidepoints
p12,p23,p31 from a triangle(p1,p2,p3). If you only need a partial results, put dummy or _ or use foo()[0,3,4].
pO,r,nv,p12,p23,p31 = incircle3D(p1,p2,p3)
pO,r, _,p12,p23,p31 = incircle3D(p1,p2,p3)
pO,r, _,dummy1,dummy2,dummy3 = incircle3D(p1,p2,p3)
p12,p23,p31 = incircle3D(p1,p2,p3)[3,4,5]
annotate_program.just2show_length_annotaion_usage()
To indicate equal lengthes by putting symbols on line segments.
mar_a = mpl.markers.MarkerStyle(marker='_')
mar_a._transform = mar_a.get_transform().rotate_deg(-30)
ax2.scatter3D(*zip(pointA,),marker=mar_a,s=90,color='k')
mar2 = mpl.markers.MarkerStyle(marker='$||$')
(continues on next page)
mar1 = mpl.markers.MarkerStyle(marker='$|||$')
mar1._transform = mar1.get_transform().rotate_deg(-15)
ax2.scatter3D(*zip(pointC,),marker=mar1,s=100,color='k')
ax2.scatter3D(*zip(point1,),marker='o',s=64,edgecolors='k',facecolor="None")
ax2.scatter3D(*zip(point2,),marker='s',s=64,edgecolors='k',facecolor="None")
ax2.scatter3D(*zip(point3,),marker='$=$',s=64,edgecolors='k',facecolor="None")
annotate_program.offset_curve(curve, length)
Translate the position of all points on a 3D curve according to each point’s normal direction described below,
by specified length in mm. This operation is in a 2D plane. The offset normal direction is right hand rule’s palm
direction, with four fingers point along the curve starting from the first point, and thumb pointing perpendicular
to the 2D plane, normally opposing the viewing direction.
./figures/tex_group_logo.pdf
7
Common geometry drawing functions in 3D Documentation
This function also works for the following case where O is outside of triangle ABC. See fig. Image generated
by ceva_third_point.py.
annotate_program.return_orthocenter(p1, p2, p3)
Return orthocenter by first finding two points of foot of perpendicular then using Ceva Theorem.
annotate_program.return_third_point_on_a_triagle_under_Ceva_Theorem(pA, pB,
pC, pD,
pE)
Given points ABCDE, return point F.
9
Common geometry drawing functions in 3D Documentation
The py script to generate this fig is the same as the script that generates the fig in the incircle3D funtion, the
incircle_triangle.py, but in a different git commit, tagged xyzr_thir_sed.
annotate_program.triangle_area(pA, pB, pC)
Given points ABC, return area using Heron’s Theorem.
a
annotate_program, 5
11