Script two planes

Hi
I have a set of cartesian coordinates that define two plane of different
atoms.
Is it possible calculate distance and orthogonal projection?
regards

Alberto

This is my data

24
test plane

Pb -9.9300426676 4.1025666804 8.7420388123
Pb -4.0641923655 4.0198687706 1.6849745870
Pb -9.9866302880 4.1933336180 -1.3285956262
Pb -4.1207799859 4.1106357083 -8.3856598515
Pb -1.2684114297 4.1285931245 6.3124736259
Pb 4.5974388723 4.0458952147 -0.7445905994
Pb -1.3249990502 4.2193600622 -3.7581608126
Pb 4.5408512519 4.1366621524 -10.8152250379
Pb 7.3932198081 4.1546195686 3.8829084395
Pb 13.2590701101 4.0719216589 -3.1741557858
Pb 7.3366321877 4.2453865063 -6.1877259990
Pb 13.2024824897 4.1626885965 -13.2447902243
Mg -11.5004149207 -4.2961447648 13.2944782095
Mg -5.6345646187 -4.3788426745 6.2374139842
Mg -11.5570025411 -4.2053778271 3.2238437711
Mg -5.6911522391 -4.2880757369 -3.8332204543
Mg -2.8387836829 -4.2701183206 10.8649130231
Mg 3.0270666192 -4.3528162304 3.8078487978
Mg -2.8953713033 -4.1793513830 0.7942785847
Mg 2.9704789987 -4.2620492927 -6.2627856407
Mg 5.8228475550 -4.2440918765 8.4353478367
Mg 11.6886978570 -4.3267897862 1.3782836114
Mg 5.7662599345 -4.1533249388 -1.6352866017
Mg 11.6321102366 -4.2360228486 -8.6923508271
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20180508/649defca/attachment-0001.html>

Alberto,

It should be possible to do that with python, but I don't see a path
forward where matplotlib is required. Linear algebra and interpolation
available in numpy and scipy should suffice.
-Paul

···

On Tue, May 8, 2018 at 12:13 PM, alberto <voodoo.bender at gmail.com> wrote:

Hi
I have a set of cartesian coordinates that define two plane of different
atoms.
Is it possible calculate distance and orthogonal projection?
regards

Alberto

This is my data

24
test plane

Pb -9.9300426676 4.1025666804 8.7420388123
Pb -4.0641923655 4.0198687706 1.6849745870
Pb -9.9866302880 4.1933336180 -1.3285956262
Pb -4.1207799859 4.1106357083 -8.3856598515
Pb -1.2684114297 4.1285931245 6.3124736259
Pb 4.5974388723 4.0458952147 -0.7445905994
Pb -1.3249990502 4.2193600622 -3.7581608126
Pb 4.5408512519 4.1366621524 -10.8152250379
Pb 7.3932198081 4.1546195686 3.8829084395
Pb 13.2590701101 4.0719216589 -3.1741557858
Pb 7.3366321877 4.2453865063 -6.1877259990
Pb 13.2024824897 4.1626885965 -13.2447902243
Mg -11.5004149207 -4.2961447648 13.2944782095
Mg -5.6345646187 -4.3788426745 6.2374139842
Mg -11.5570025411 -4.2053778271 3.2238437711
Mg -5.6911522391 -4.2880757369 -3.8332204543
Mg -2.8387836829 -4.2701183206 10.8649130231
Mg 3.0270666192 -4.3528162304 3.8078487978
Mg -2.8953713033 -4.1793513830 0.7942785847
Mg 2.9704789987 -4.2620492927 -6.2627856407
Mg 5.8228475550 -4.2440918765 8.4353478367
Mg 11.6886978570 -4.3267897862 1.3782836114
Mg 5.7662599345 -4.1533249388 -1.6352866017
Mg 11.6321102366 -4.2360228486 -8.6923508271

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users at python.org
Matplotlib-users Info Page

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20180508/6fef25ac/attachment.html&gt;

Hi Paul,
I would visualize the atoms of two planes to see how much they are tilted.
I'm a beginner of python, but I think that matplotlib is necessary.

Alberto

···

Il mar 8 mag 2018 09:18 PM Paul Hobson <pmhobson at gmail.com> ha scritto:

Alberto,

It should be possible to do that with python, but I don't see a path
forward where matplotlib is required. Linear algebra and interpolation
available in numpy and scipy should suffice.
-Paul

On Tue, May 8, 2018 at 12:13 PM, alberto <voodoo.bender at gmail.com> wrote:

Hi
I have a set of cartesian coordinates that define two plane of different
atoms.
Is it possible calculate distance and orthogonal projection?
regards

Alberto

This is my data

24
test plane

Pb -9.9300426676 4.1025666804 8.7420388123
Pb -4.0641923655 4.0198687706 1.6849745870
Pb -9.9866302880 4.1933336180 -1.3285956262
Pb -4.1207799859 4.1106357083 -8.3856598515
Pb -1.2684114297 4.1285931245 6.3124736259
Pb 4.5974388723 4.0458952147 -0.7445905994
Pb -1.3249990502 4.2193600622 -3.7581608126
Pb 4.5408512519 4.1366621524 -10.8152250379
Pb 7.3932198081 4.1546195686 3.8829084395
Pb 13.2590701101 4.0719216589 -3.1741557858
Pb 7.3366321877 4.2453865063 -6.1877259990
Pb 13.2024824897 4.1626885965 -13.2447902243
Mg -11.5004149207 -4.2961447648 13.2944782095
Mg -5.6345646187 -4.3788426745 6.2374139842
Mg -11.5570025411 -4.2053778271 3.2238437711
Mg -5.6911522391 -4.2880757369 -3.8332204543
Mg -2.8387836829 -4.2701183206 10.8649130231
Mg 3.0270666192 -4.3528162304 3.8078487978
Mg -2.8953713033 -4.1793513830 0.7942785847
Mg 2.9704789987 -4.2620492927 -6.2627856407
Mg 5.8228475550 -4.2440918765 8.4353478367
Mg 11.6886978570 -4.3267897862 1.3782836114
Mg 5.7662599345 -4.1533249388 -1.6352866017
Mg 11.6321102366 -4.2360228486 -8.6923508271

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users at python.org
Matplotlib-users Info Page

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20180508/17e32156/attachment-0001.html&gt;

It's been a long time since I had to do surface fitting to data (let alone
display of such), so I did a quick search and found an answer for you that
not only finds best-fit plane, but also displays the input points with a
wireframe to represent the plane, and all of that in a rotating 3D display.
The solution uses matplotlib.pytplot.plot_wireframe() and Axes3D (it
imports it, but I don't see it get used).
Here's the answer, from stackexchange, of course:

···

----
Glenn Nelson in Santa Cruz
social: http://google.com/+GlennNelson
see my Kite Aerial Photos at kap image catalog

On Tue, May 8, 2018 at 2:16 PM alberto <voodoo.bender at gmail.com> wrote:

Hi Paul,
I would visualize the atoms of two planes to see how much they are tilted.
I'm a beginner of python, but I think that matplotlib is necessary.

Alberto

Il mar 8 mag 2018 09:18 PM Paul Hobson <pmhobson at gmail.com> ha scritto:

Alberto,

It should be possible to do that with python, but I don't see a path
forward where matplotlib is required. Linear algebra and interpolation
available in numpy and scipy should suffice.
-Paul

On Tue, May 8, 2018 at 12:13 PM, alberto <voodoo.bender at gmail.com> wrote:

Hi
I have a set of cartesian coordinates that define two plane of different
atoms.
Is it possible calculate distance and orthogonal projection?
regards

Alberto

This is my data

24
test plane

Pb -9.9300426676 4.1025666804 8.7420388123
Pb -4.0641923655 4.0198687706 1.6849745870
Pb -9.9866302880 4.1933336180 -1.3285956262
Pb -4.1207799859 4.1106357083 -8.3856598515
Pb -1.2684114297 4.1285931245 6.3124736259
Pb 4.5974388723 4.0458952147 -0.7445905994
Pb -1.3249990502 4.2193600622 -3.7581608126
Pb 4.5408512519 4.1366621524 -10.8152250379
Pb 7.3932198081 4.1546195686 3.8829084395
Pb 13.2590701101 4.0719216589 -3.1741557858
Pb 7.3366321877 4.2453865063 -6.1877259990
Pb 13.2024824897 4.1626885965 -13.2447902243
Mg -11.5004149207 -4.2961447648 13.2944782095
Mg -5.6345646187 -4.3788426745 6.2374139842
Mg -11.5570025411 -4.2053778271 3.2238437711
Mg -5.6911522391 -4.2880757369 -3.8332204543
Mg -2.8387836829 -4.2701183206 10.8649130231
Mg 3.0270666192 -4.3528162304 3.8078487978
Mg -2.8953713033 -4.1793513830 0.7942785847
Mg 2.9704789987 -4.2620492927 -6.2627856407
Mg 5.8228475550 -4.2440918765 8.4353478367
Mg 11.6886978570 -4.3267897862 1.3782836114
Mg 5.7662599345 -4.1533249388 -1.6352866017
Mg 11.6321102366 -4.2360228486 -8.6923508271

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users at python.org
Matplotlib-users Info Page

_______________________________________________

Matplotlib-users mailing list
Matplotlib-users at python.org
Matplotlib-users Info Page

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20180511/09ad1bbb/attachment.html&gt;