numberscope / frontscope

Numberscope's front end and user interface: responsible for specifying sequences and defining and displaying visualizers
MIT License
7 stars 14 forks source link

Should Turtle pause when it has wandered far away? Or draggable viewport? #381

Open gwhitney opened 4 days ago

gwhitney commented 4 days ago

It's fairly easy to set up a Turtle that runs offscreen and spends lots of time far from the origin, but keeps using processor power etc. as it "draws" this invisible part of the turtle's path. Of course, sometime the turtle can return from afar, but often it doesn't. Would it be worth it to make Turtle watch itself and if it spends some large number of turns outside the visible area, it pauses itself (noloops) to stop burning processor cycles? If #380 is addressed in some way, this could still allow the person doing the visualization to click play to continue further if they want to, to see if it comes back.

As an alternative, or in addition, it could be cool to have the viewport of the Turtle be draggable, so you could drag the whole image around and "find" the Turtle and watch whatever it's doing now. That sounds like a bunch more work, but cooler and more fun in the end. I guess the ultimate version of this would also allow zooming the whole picture in or out in some way, without disrupting what's already been drawn or the current action of the turtle. That might well need to depend on a switch to the svg version of p5 to be feasible.

katestange commented 4 days ago

Another possible idea (in combination or instead) is to let the turtle visualizer adjust itself (zoom/pan) to keep the turtle in view.

katestange commented 3 days ago

Also the turtle should allow zooming.