How to draw a spherical triangle on a sphere in 3D?

Suppose you know three vertices for a spherical triangle. Then how do you draw sides on a sphere in 3D?

I need python code for use in Blender 3d modeling software.

I already have a sphere made in 3D in Blender.

Thanks and happy blending.

note 1:

i have 3 points / vertices (p1, p2, p3) on a sphere for a spherical triangle but I need to trace the edges on the sphere in 3D

So, what would be the equations needed to determine all the vertices between each point of a pair of triangles on the sphere 3 edges from p1 to p2 - p2 to p3 and o3 to p1

I know that this has something to do with the Great Circle for geodesics on a sphere but cannot find the correct equations for calculating in spherical coordinates!

thank


Great circles

!


ok

,

- **

i shonw ealier

, , ?

python Ctrl-V?

2.5


!

-

, , , ,

2-   , , python sript triangel patch foum IRC python sems, , , 2.5 Beta vesion, 2

2.5

+3
2

Python Blender:

import math
import Blender
from Blender import NMesh

x = -1 * math.pi

mesh = NMesh.GetRaw()
vNew = NMesh.Vert( x, math.sin( x ), 0 )
mesh.verts.append( vNew )

while x < math.pi:
 x += 0.1
 vOld = vNew
 vNew = NMesh.Vert( x, math.sin( x ), 0 )
 mesh.verts.append( vNew )
 mesh.addEdge( vOld, vNew )

NMesh.PutRaw( mesh, "SineWave", 1 )
Blender.Redraw()

: http://davidjarvis.ca/blender/tutorial-04.shtml

, :

, ?

, :

  • P 1= (x 1, y 1, z 1)
  • P 2= (x 2, y 2, z 2)

, P 1 P 2 :

  • :
    
    R = sqrt( x12 + y12 + z12 )
    
  • (m) P 1 P 2:
    
    Pm = (xm, ym, zm)
    xm = (x1 + x2) / 2
    ym = (y1 + y2) / 2
    zm = (z1 + z2) / 2
  • P 1 P 2:
    
    Lm = sqrt( xm2, ym2, zm2 )
  • :
    
    k = R / Lm
  • :
    
    Am = k * Pm = (k * xm, k * ym, k * zm)

P 1 P 2 :

  • P 1 A m
  • A m P 2

. , P 1 A m A m P 2. , .

, , , () . , (, 0,01 ).

Spline

spline :

  • (, )
  • P < > 1 >
  • < > >
  • P < > 2 >

.

Blender Artists

Blender , ; .

.

http://www.mathnews.uwaterloo.ca/Issues/mn11106/DotProduct.php

http://cr4.globalspec.com/thread/27311/Urgent-Midpoint-of-Arc-formula

+4

, .

0

Source: https://habr.com/ru/post/1752989/


All Articles