mb1986 / rm-hacks

Small improvements and tweaks for rM devices, covering both rM1 and rM2.
Other
544 stars 9 forks source link

[enhancement] feature req: super basic geometry support? #398

Open CoolPenguin42 opened 21 hours ago

CoolPenguin42 commented 21 hours ago

Hello! Was wondering if it would be in any way possible to add super basic geometry support to rmhacks? Along the lines of a simple circle, rectangle, right triangle?

Of course I am unfamiliar with how xochitl works under the hood but would it be possible to exploit the built-in straight line tool (takes point one, point two, calculates and creates straight line between them after holding down on point 2 for a while), to maybe generate the (x,y) coords for start and end points for given geometry. From that, again not sure how it would be done, but would it be possible to then just calculate and "draw" the given shape?

Circle: start point would be center, end point would give info to calculate radius and theta. You could then increment theta in steps to draw the circle at given radial endpoint. Would need to get rid of the original straight line created by rm?

Triangle: would have to be a right triangle, but straight line is hypotenuse, you have (x_1, y_1) and (x_2, y_2) already found w/ straight line tool, then you would just need to get (x_2, y_1) and connect the points.

Rectangle: same as triangle, just calc (x_1, y_2) as well, link w/ other 2 points, remove main diagonal?

Obviously that is just some sort of framework as to how I assume xochitl does things, so if that is incorrect then obviously my thoughts would not work. But if such a thing is possible, would it be feasible to implement?

PepikVaio commented 19 hours ago

Try this: https://rmkit.dev/apps/iago

CoolPenguin42 commented 10 hours ago

Try this: https://rmkit.dev/apps/iago

Ooh, well that seems cool. Is it possible to use this on 3.11.2.5? I wasn't able to find supported versions for iago or it's dependencies, but overall it seems that the rmkit stuff isn't supported past 3.2 ish?

PepikVaio commented 7 hours ago

Unfortunately, this is not possible yet. The ideal installation is via toltec. And it is available for older versions. But I plan to release a shortcut for the iPhone, where it will be possible to use it on any version.

You can follow me for more info on YouTube.

https://youtube.com/@wajsar_josef?si=KIF-TD5R0eMQhWm3