[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnuplot-info
Subject:    Re: [Gnuplot-info] Weird spherical mapping?
From:       "Mauricio Galo (Dep. de Cartografia)" <galo () fct ! unesp ! br>
Date:       2016-05-20 13:31:48
Message-ID: 1340512221.1143223.1463751108517.JavaMail.zimbra () fct ! unesp ! br
[Download RAW message or body]

Simon

In your data set you have the angles "theta" and "phi". To know the correct set of \
equations you should inform two thinks:

- Your "theta" angles is the horizontal angle or de vertical angle?
- Your vertical angle starts on the vertical axis Z or in the horizontal plane?

By knowing these answer it will be possible to define the equations without doubt.

M. Galo

----- Mensagem original -----
De: "Simon Lenz" <s_lenz10@cs.uni-kl.de>
Para: gnuplot-info@lists.sourceforge.net
Enviadas: Sexta-feira, 13 de maio de 2016 10:29:15
Assunto: [Gnuplot-info] Weird spherical mapping?

Hello,

I'm trying to plot some 3D points defined in spherical coordinates.
(like this
https://upload.wikimedia.org/wikipedia/commons/thumb/6/69/Kugelkoord-def.svg/300px-Kugelkoord-def.svg.png)


So as specified in the wikipedia article[1] the spherical->carthesian
conversion should works like this:
      x = r * sin(theta) * cos(phi)
      y = r * sin(theta) * sin(phi)
      z = r * cos(theta)

My problem is now, that as documented in (set mapping spherical)
gnuplot does the spherical->carthesian conversion like this:
      x = r * cos(theta) * cos(phi)
      y = r * sin(theta) * cos(phi)
      z = r * sin(phi)

For me this seems like an odd non-standard way of doing things. But
on the other side, I'm not really familiar with the whole thing. 

How can I achieve an output with correct corrdinates for my data?

thanks in advace,

Simon

---------

script:
	set xlabel "x"
	set ylabel "y"
	set zlabel "z"
	set xrange [-1:1]
	set yrange [-1:1]
	set zrange [-1:1]
	set mapping spherical
	set angles degrees
	splot 'test.dat'

	pause -1

data:
	#theta phi r
	0 0 1
	90 180 1

[1]
https://en.wikipedia.org/wiki/Spherical_coordinate_system#Cartesian_coordinates

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
gnuplot-info mailing list
gnuplot-info@lists.sourceforge.net
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
gnuplot-info mailing list
gnuplot-info@lists.sourceforge.net
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic