Page 1 of 3 123 LastLast
Results 1 to 15 of 40

Thread: New Puzzle Generator!

  1. #1
    Join Date
    Aug 2014
    Location
    Milwaukee, WI
    Posts
    289
    Blog Entries
    1

    New Puzzle Generator!

    Well I hope yall will be as excited as I am! Failing to find a puzzle generator online or anything reasonably priced, I decided to do what I should have done in the first place Make one.

    This is not just an overlay, it generates the puzzle based on your input of size, pieces per row and selected tab shape. I made 6 tab styles to start with so I could get it going. I can easily add more tab styles as time permits. If yall have some good ideas on tabs, send them along to me as SVG or Corel (x7 or earlier) and I can probably add them. You will want to keep the node count low (8-12), remember its 4 of these tabs per side per piece!

    You specify a few parameters and it will generate various output styles for you to use. It will generate cut lines (all horizontal at once, all vertical at once) for lasers. This way the laser can cut an entire path across the puzzle instead of individual pieces. That really cuts down on laser time. It will optionally generate grouped shapes as individual pieces. This would be useful as a graphics overlay use.

    The output SVG is fully vector so its scaleable with no loss in quality.

    I generated a 4x3 puzzle and cut it out of 3mm ply. It worked perfectly and the pieces fit just fine.

    I would appreciate any feedback on it. I am always looking to improve how I do things. I have only tested this in FireFox. My IE is not allowed on the web (firewall). I don't think there should be an issue with other browsers though.



    PuzzleScreenShot.jpg
    Last edited by Mike Null; 04-23-2019 at 1:26 PM. Reason: deleted link to personal site
    [SIZE=1]Generic Chinese 50w 300x500
    Lulzbot TAZ 5 3D Printer

    Corel X7, Photoshop CS6, Lightroom 4
    Modo, Bryce, Poser


    If You Can Read, Thank A Teacher. If You Can Read It In English, Thank A Veteran
    That's what you do in a herd: you look out for each other. - Manny from Ice Age

  2. #2
    Amazing job Mike! Works in Safari just fine. That's just excellent, thanks for sharing it with us!
    Lasers : Trotec Speedy 300 75W, Trotec Speedy 300 80W, Galvo Fiber Laser 20W
    Printers : Mimaki UJF-6042 UV Flatbed Printer , HP Designjet L26500 61" Wide Format Latex Printer, Summa S140-T 48" Vinyl Plotter
    Router : ShopBot 48" x 96" CNC Router Rotary Engravers : (2) Xenetech XOT 16 x 25 Rotary Engravers

    Real name Steve but that name was taken on the forum. Used Middle name. Call me Steve or Scott, doesn't matter.

  3. #3
    It even works on my iPad.

  4. #4
    Hi Mike

    Great job, if you really wanted to polish it you could add some randomness to the tab locations and piece shapes to make them unique. It looks like you could fit the wrong piece perfectly into the wrong place. If they were unique then each piece would only fit in one spot.

    Cheers
    Keith
    Universal Laser VLS6.60, Tantillus 3D printer, Electronic design
    edns Group, Mairangi Bay, Auckland, New Zealand

  5. #5
    Join Date
    Aug 2014
    Location
    Milwaukee, WI
    Posts
    289
    Blog Entries
    1
    Quote Originally Posted by Keith Colson View Post
    Hi Mike

    Great job, if you really wanted to polish it you could add some randomness to the tab locations and piece shapes to make them unique. It looks like you could fit the wrong piece perfectly into the wrong place. If they were unique then each piece would only fit in one spot.

    Cheers
    Keith
    Thank you for your thoughts! Its that sort of thing I am looking for

    Yes, that is one of the things I was looking at adding in the future. I had been working on a method of doing so but wanted to get the core of the generator working and get a reasonable shape library started first.

    One idea I came up with is defining each row and column's unique height and width and then scaling the tabs accordingly as its output. For example I was looking at scaling all even rows. So row 2,4,6 etc would each have a unique height apart from all others. The difficulty I was running into is in the end the sum of the sizes would need to be the same. So if row 2 was reduced by X amount, then row 4 would have to be increased by the same amount to make it all come out at the bottom row. As I said, still a WIP.

    Another method I was looking at was skewing the nodes where the tab joins its parent piece. Pushing them within the piece either left or right. This alleviates the need to deal with the rows but it also requires I define the node range in the data matrix where skewing would take place while other points would remain fixed. So, again, not an easy solution but a possible one. In the same vein, an alternate would be to scale the tab width so the tab simply is a different width for each piece.

    BTW, I have added the following new tab styles...
    Clover
    Cross
    Heart
    Tree
    Ball
    Football

    Not all are suitable at smaller sizes (cross and tree for example) but for larger pieces and/or graphics work they should be fine.
    [SIZE=1]Generic Chinese 50w 300x500
    Lulzbot TAZ 5 3D Printer

    Corel X7, Photoshop CS6, Lightroom 4
    Modo, Bryce, Poser


    If You Can Read, Thank A Teacher. If You Can Read It In English, Thank A Veteran
    That's what you do in a herd: you look out for each other. - Manny from Ice Age

  6. #6
    Here are a couple of ideas.

    Add a sinusoidal modulatio to the horizontal line with a bit of randomness. And do the same with y.

    e.g.
    x = x + sin(theta) * modulataionWidth
    theta = theta + frequency + (amountOfRandomness*rnd)

    Have a checkbox for the tabs so we can choose multiple tab types that you can randomize into the pieces.

    The fact that you have it working is great!

    Cheers
    Keith
    Universal Laser VLS6.60, Tantillus 3D printer, Electronic design
    edns Group, Mairangi Bay, Auckland, New Zealand

  7. #7
    Join Date
    Feb 2014
    Location
    North Coast, NSW, Australia
    Posts
    73
    Very impressive! I look forward to seeing how the randomness progresses.
    Works great in Chrome.
    Vector Etch Laser Cutting & Engraving
    Brisbane, QLD, Australia

    Trotec Speedy 360 120W
    Trotec Speedy 100 60W

  8. #8
    Join Date
    Aug 2014
    Location
    Milwaukee, WI
    Posts
    289
    Blog Entries
    1
    I tried it on my android phone. It works but that browser does not support SVG as images. So I added some javascript to detect browser support for SVG and it displays a warning beside the Preview/Download option box telling you that your browser doesn't support SVG. It also shuts off the attempt to render the piece previews.
    [SIZE=1]Generic Chinese 50w 300x500
    Lulzbot TAZ 5 3D Printer

    Corel X7, Photoshop CS6, Lightroom 4
    Modo, Bryce, Poser


    If You Can Read, Thank A Teacher. If You Can Read It In English, Thank A Veteran
    That's what you do in a herd: you look out for each other. - Manny from Ice Age

  9. #9
    brilliant!

    That is all I can think of really great job Mike

    cheers

    Dave
    You did what !

  10. #10
    Join Date
    Aug 2014
    Location
    Milwaukee, WI
    Posts
    289
    Blog Entries
    1
    Quote Originally Posted by Keith Colson View Post
    Here are a couple of ideas.

    Add a sinusoidal modulatio to the horizontal line with a bit of randomness. And do the same with y.

    e.g.
    x = x + sin(theta) * modulataionWidth
    theta = theta + frequency + (amountOfRandomness*rnd)

    Have a checkbox for the tabs so we can choose multiple tab types that you can randomize into the pieces.

    The fact that you have it working is great!

    Cheers
    Keith
    A little easier

    I did some reading on the transformation function in SVG and I was able to re-code the row/column generation to apply randomness in the form of skew. I set a parameter (max skew) for each tab. I now provide you two dropdown boxs to select the amount of skew as a percentage in the X and Y directions. It then chooses a random number based on the max set by the tab data and percent you selected and then randomizes the positive/negative direction. When the row is written, its wrapped in a group layer that has the skew applied to it.

    I tested this in Corel X7 and the browsers available to me. It appears to work just fine. I even ungrouped all the objects and the transformations applied remain in place in Corel. The exported DXF as loaded in RDWorks also contains the transformations.

    So, there ya go. Randomness

    Not sure how much more work I am going to do to it in the near future. I am leaving for Florida next weekend and will be down there until after the new-years.
    [SIZE=1]Generic Chinese 50w 300x500
    Lulzbot TAZ 5 3D Printer

    Corel X7, Photoshop CS6, Lightroom 4
    Modo, Bryce, Poser


    If You Can Read, Thank A Teacher. If You Can Read It In English, Thank A Veteran
    That's what you do in a herd: you look out for each other. - Manny from Ice Age

  11. #11
    Well done Mike, you are truly a winner!

    Cheers
    Keith
    Universal Laser VLS6.60, Tantillus 3D printer, Electronic design
    edns Group, Mairangi Bay, Auckland, New Zealand

  12. #12
    Join Date
    Jul 2014
    Location
    South Elgin, IL
    Posts
    217
    I tried this out last night and the puzzle turned out real nice!

    With the material I was cutting, I decided to make 3 passes and although I thought I had selected Rows/Columns for continuous cut lines, it actually cut each line 3 times before proceeding to the next piece.
    It first processed the horizontal, then went on to the vertical, but each piece was processed as a separate line.

    The outer border did continuously cut the entire shape before making the additional passes.

    Should I have done any additional editing in Corel like join nodes or ?
    Maybe I just didn't select Rows/Columns like I thought I did...
    I can upload a video of it if necessary.

    Trying it again today.
    Now if I can figure out how to eliminate the burnt smell on the puzzle!
    Materials Conversion Specialist
    I take perfectly good large pieces of stuff & turn them into smaller pieces having dubious value

    LASER: Trotec Speedy 300 30 Watt, CNC: Shopbot PRT, Vinyl Cutter: Summa Sign Pro T750
    Old School: a tool box full of brand new sign painting brushes from the 60's


  13. #13
    Join Date
    Sep 2013
    Location
    Western Australia
    Posts
    264
    Quote Originally Posted by Keith Colson View Post
    Here are a couple of ideas.

    Add a sinusoidal modulatio to the horizontal line with a bit of randomness. And do the same with y.

    e.g.
    x = x + sin(theta) * modulataionWidth
    theta = theta + frequency + (amountOfRandomness*rnd)

    Have a checkbox for the tabs so we can choose multiple tab types that you can randomize into the pieces.

    The fact that you have it working is great!

    Cheers
    Keith

    EXACTLY - what I was going to suggest
    HARDWARE - Macbook Retina Pro - Toshiba Satellite - Epilog Helix 60W Co2 Laser & Rotary - Trotec Speedy 300 Co2 Laser - Gravo IS400 IQ Engraver. - Pcut CTO630 Vinyl Cutter. - Wacom DTF720 Touch / Trace Screen - GKS DC16 Sublimation Press - Chinese 6040 CNC Router
    SOFTWARE - VMware Fusion / Windows 8.1 - Coreldraw X6 - Trotec Job Control 9.4.4.2 - E-cut - Gravostyle 7 - ULS 1Touch Photo - BizzWizz Invoicing / Stock Control / Ledger - VB6 Pro - Mach3 - V-Carve Desktop

  14. #14
    Can you make it a downloadable executable for those who don't always have access (or reliable access) to the web!
    Epilog Helix 60w
    Epilog Mini 18 30W
    Purex Xbase 200
    CorelDRAW X7
    Wood Carver

  15. #15
    Join Date
    Aug 2014
    Location
    Milwaukee, WI
    Posts
    289
    Blog Entries
    1
    Quote Originally Posted by Mayo Pardo View Post
    I tried this out last night and the puzzle turned out real nice!

    With the material I was cutting, I decided to make 3 passes and although I thought I had selected Rows/Columns for continuous cut lines, it actually cut each line 3 times before proceeding to the next piece.
    It first processed the horizontal, then went on to the vertical, but each piece was processed as a separate line.

    The outer border did continuously cut the entire shape before making the additional passes.

    Should I have done any additional editing in Corel like join nodes or ?
    Maybe I just didn't select Rows/Columns like I thought I did...
    I can upload a video of it if necessary.

    Trying it again today.
    Now if I can figure out how to eliminate the burnt smell on the puzzle!
    I ran into that as well. Not just with my puzzle code either. I have had that happen several times with other downloaded designs and one of the box generators online. There is a function in RDWorks (what my laser uses) that combines all nodes within a certain distance. My default is .5mm. Its such a habit at this point, I do it every time I load a DXF (since I can't send direct from Corel X7), I guess I never thought to mention it or see what the root cause was. There may be a Corel function to do the same job, though I don't know what it is (HINT to the Corel Gurus to chime in!). In RDWOrks, its literlally 2 mouse clicks and I do it every time I open a file. Habit you know.

    I am thinking its in the way each edge is included in the row. The curve is drawn, then a pen move and then the next curve. The nodes on the curve are relative to the current pen position in SVG (hence why the scale/skew was so easy to implement) and thats the reason for the move pen command before each side is drawn.

    If you had selected individual pieces, you could select each piece in the puzzle from the object panel in Corel and you would be able to move it. It would also result as a double cut at the laser since it would result in duplicate cut commands where pieces join.

    The reason the outer cut is done as a continuous cut is its drawn as a RECTangle and is a single object.


    As for the burnt smell, I coated mine with a semi-gloss clear coat and hit it with #0000 wool and tack cloth before cutting. Then I use 100% denatured alcohol with an old t-shirt cloth and wipe it down well after the cut. Then I spread the pieces out on a TV tray with wax paper and I give it a light coat again from all 4 directions which catches the edges. After the clear coat dries there is almost no noticeable burn smell. And the puzzle looks really good after the clear coat. I am using Deft fast drying clear coat.
    [SIZE=1]Generic Chinese 50w 300x500
    Lulzbot TAZ 5 3D Printer

    Corel X7, Photoshop CS6, Lightroom 4
    Modo, Bryce, Poser


    If You Can Read, Thank A Teacher. If You Can Read It In English, Thank A Veteran
    That's what you do in a herd: you look out for each other. - Manny from Ice Age

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •