= #JxnPortable\docs\plot_examples\demos\Loxodrome~Kugel.jxn
!
slider = @JxnSliderPanel( $this )
! Kurs (heading)
kurs = slider.add( "Kurs", 10., 0., 90. )
#JXN:include/P3DInclude
!
! Kugel: x = F(u,v), y = G(u,v), z = H(u,v)
r = 1
xy = @JxnUVGrid( -90., 90., 30., 0., 360., 30., 5 )
lat = xy.u()
lon = xy.v()
x = r cosD lat * cosD lon
y = r cosD lat * sinD lon
z = r sinD lat
!
! Loxodrome (rhumb line): x = f(t), y = g(t), z = h(t)
lambda = 2 PI 5 t sqrt( 12 / ( kurs + 2 ) )
h = lambda tanD kurs
cosh_h = cosh h
xLoxo = r sin lambda / cosh_h
yLoxo = r cos lambda / cosh_h
zLoxo = r sinh h / cosh_h
! pf = plot( p3d, 0.5 ) + curve( x, y, z, p3d ) + curve( xLoxo, -yLoxo, zLoxo, p3d, B, 2 ) + curve( -xLoxo, -yLoxo, -zLoxo, p3d, G, 2 )
pf = plot( p3d, 0.5 ).add( x, y, z ).add( xLoxo, -yLoxo, zLoxo, B, 2 ).add( -xLoxo, -yLoxo, -zLoxo, G, 2 )
pf.setPlotFrameTitle( "Loxodrome" )