Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draw-Your-Own-Pattern Functionality #308

Open
moeller5002 opened this issue Dec 2, 2024 · 8 comments
Open

Draw-Your-Own-Pattern Functionality #308

moeller5002 opened this issue Dec 2, 2024 · 8 comments

Comments

@moeller5002
Copy link

moeller5002 commented Dec 2, 2024

Hi!
I just wanted to share my attempt at a HTML/Javascript program to create a Sandtable pattern from just drawing it on your screen.
It has functionality to import & position a background image for tracing, and my attempts can be seen in the attached images. There are still some bugs with reflections & rotations in the pattern when I import them into sandify, but overall it works reliably. Would love to see this feature implemented into the standard sandify!
DrawYourOwnTHR.txt
Appreciate all you've done,
Justin

DrawYourOwn_Pic1
DrawYourOwn_Pic2

@vincentbraillard
Copy link

Whow that very nice. Have you a video ton better see it?

@moeller5002
Copy link
Author

Here's a really quick sketch using my mouse. If you have a touchscreen or stylus, its much easier!

Untitled.video.-.Made.with.Clipchamp.COMPRESS.mp4

@vincentbraillard
Copy link

Nice 🙌🙌

@Phoenix203apple
Copy link

There is a coding error in the APP, how can it be resolved?

@moeller5002
Copy link
Author

12/6/2024 Updates:
Improved functionality with pen raises & drops. Improved theta formula to take into account crossing different axis. (Prevents the weird rotation/reflection issue of last program).
DrawYourOwnTHR - BEST.txt

Created Debugger Graphs to help discover any issues.
Includes a graph showing theta & rho as a function of time (point #). For a good pattern, this should be continuous, with no big jumps.
Includes a second canvas, that live-plots your pattern, to ensure that the calculated theta&rho can be converted back to the original coordinates.

DrawYourOwnTHR - BEST - With Debug Graphs.txt

@Phoenix203apple
Copy link

What should I do? This is the first time I encounter this situation. Are the two files you gave me to replace the files in the SD card? If possible, please guide me, thank you!

@moeller5002
Copy link
Author

moeller5002 commented Dec 7, 2024

Happy to help, sorry for not being clearer...

How to use:

  1. Save the ".txt" files above to your computer.
  2. Open the file in your text editor
  3. File > Save As > Hyper Text Markup Language (.html)
  4. Close out of ".txt" file
  5. Open the .html file. You should see the webpage!

You can then draw whtever pattern you'd like. When finished, click "export pattern" to save the ".thr" file. This ".thr" file is the file you will put on the SD Card for your table

@bobnik
Copy link
Collaborator

bobnik commented Jan 25, 2025

Hi Justin. I've finally played around with your DYOP page. I like it, and I can see a place for this in Sandify. Here's what I am imagining, roughly:

Image

  • Add new "draw" top tab.
  • On this tab, the user has a canvas like your current page where they can draw whatever they want.
  • Palette buttons:
    • Arrow: Select an existing line.
    • Pencil: Draw a new line. The line appears as a series of dots as you are doing now. However, as soon as they stop drawing, the application converts it into a contiguous line like you have in the preview. This "line" is now an object that can be selected, moved, and/or deleted.
  • Other buttons:
  • Import as layer - adds it to the Patterns tab.
  • Clear - clears all lines.

Let me know your thoughts, and I'll give some more thought on how we can pull the logic in your app into the Sandify structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants