Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4834

Other programming languages • Re: Pari/GP CAS (Computer Algebra System)

$
0
0
I did determine maximal number of vertices in a single plane (same level, same color), then determined normal vector for that plane (I learned on PARI/GP email list how to do that with this nice short command) ...

Code:

v=matker(Mat(apply(x->concat(x,1),P~)))[,1];
...and the point in plane with minimal distance to origin (the small black sphere). Finally I did draw the plane itself transparent. There was no primitive for that in JSCAD, but using a very thin cuboid did the job! I really like the alpha slider for immediately changing transparency. This model was generated with:
https://github.com/Hermann-SW/GP3D/blob ... qf_3D.2.gp

Code:

pi@raspberrypi5:~/GP3D $ n=37 make tqf_3D.2gp -q < tqf_3D.2.gpn=37pi@raspberrypi5:~/GP3D $ 
tqf_3D.2.gp.n_37.jpg
The idea of generating JSCAD model from PARI/GP was that you can view, translate, rotate and zoom in your browser. Works nicely. I used my personal website as URL shortener for the 7543 bytes long application/gzip jscad.app data URL. Click, and you can play with the model in your browser:
https://stamm-wilbrandt.de/tqf_3D.2.gp.n_37.html

This animated .gif was recorded with peek screenrecorder (under X11 and not Wayfire) of chromium browser on Raspberry Pi5, generated with "n=61 make tqf_3D.2" of current GP3D repo:
Image

Statistics: Posted by HermannSW — Fri Feb 09, 2024 11:38 am



Viewing all articles
Browse latest Browse all 4834

Trending Articles