PDLPorters / pdl

Scientific computing with Perl
http://pdl.perl.org
Other
90 stars 44 forks source link

SF feature request #73 - add axis and viewpoint control to TriD graphics #328

Open mohawk2 opened 3 years ago

mohawk2 commented 3 years ago

https://sourceforge.net/p/pdl/feature-requests/73/

It would be nice to be able resize, rotate, hide/unhide axes and labels. That would provide improved support for 3D visualization and demos.

mohawk2 commented 2 years ago

A way forward here would be to use Tk for that stuff. The TkTriD_demo currently doesn't work and shows the TriD::Tk module needs updating. As of now it's not getting installed by Demos/Makefile.PL but it can be run just with perl -Mblib Demos/TkTriD_demo.pm.

A resource for getting it working is p402 et seq of this book.

mohawk2 commented 2 years ago

A PerlMonks article from 2012 with a modification to TkTriD: https://perlmonks.org/?node_id=960864

An old TriD tutorial (on Wayback Machine) linked from that: https://web.archive.org/web/20160317024758/http://zentara.net/TriD_Tutorial/TriD_Tutorial.html

Note to self: integrate the GLUT stuff back into main OpenGL.

mohawk2 commented 2 years ago

An example of a trivial Tk program that works today and embeds OpenGL: https://metacpan.org/release/CHM/OpenGL-0.70/source/examples/tk_demo.pl

Also example code from 2007: https://perlmonks.org/?node_id=646423

mohawk2 commented 2 weeks ago

Prima::OpenGL works, and shows what might be needed - a Tk::OpenGL. cf https://github.com/codeplea/opengl-tcltk