Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Drawing rectangles (tails and artifacts)

  1. #1
    Join Date
    Oct 2011
    Location
    Graz, Austria
    Posts
    43

    Thumbs up Drawing rectangles (tails and artifacts)

    Hello.

    I just got a quite cheap green laser beam these days and I'm testing part of my software that creates frames from simple drawings. The first is just a set of rectangles but there are many defects on the corners. According to help of some cool members here; I added helper points to each of the edges and some at the corners. But still it looks shitty. Anyone an idea? Thanks for any help or introduction The last image shows the reference (helper) points for the edges.




    Many thanks

    Matthias

  2. #2
    mixedgas's Avatar
    mixedgas is offline Creaky Old Award Winning Bastard Technologist
    Infinitus Excellentia Ion Laser Dominatus
    Join Date
    May 2007
    Location
    A lab with some dripping water on the floor.
    Posts
    10,119

    Default

    Add corner points, anchor points, guide points and blanking points to your software.
    Usually the amounts of these have to be somewhat variable.

    I'm too busy at work right now to explain these in detail. Has to do with how the galvos behave in ballistic and low pass phases of operation.

    Guide points are on curves. Blanking points fill in any jumps between lit points. Corner points are at 90' angles. Anchor points get used at corners , starts of lines, and on single dots.

    Swonce upon a time there was a official daffynition of these, back when hand drawn animation was the rage.

    What is the rating on the galvos, who made them? There is also such a thing as too many points, too few points, and bad galvo tuning. That is galvo and operator dependent.

    Steve

  3. #3
    Join Date
    Oct 2011
    Location
    Graz, Austria
    Posts
    43

    Default

    Hi Steve.

    Can you provide a sample drawing where to put all these guiding points? Just for my understanding.

    And sure, the number of points is variable. I calculate them in my own app depending on the length of the current line segment between two points. Im using this cheap laser (just for testing) and I have no idea of galvos or tuning. The DAC is NetLease from JM-Laser. The PointsPerSecond is usually 15.000 but I'm trying to calculate a variable rate.

    http://www.amazon.de/gp/product/B005...ls_o00_s00_i00

    Thanks for any help.

    Matthias

  4. #4
    mixedgas's Avatar
    mixedgas is offline Creaky Old Award Winning Bastard Technologist
    Infinitus Excellentia Ion Laser Dominatus
    Join Date
    May 2007
    Location
    A lab with some dripping water on the floor.
    Posts
    10,119

    Default

    O O O
    O X O
    O O O

    In software, make a 3x3 or 9x9 grid centered on the point. Look at each point on the grid to determine the angle that the line is changing to.
    If its 90, make a decision to add corner points If its less then 90 make a weighted decision on the curve. Matrix grids like this get used in autotrace too.

    I'm betting James uses Bezier fitting or some other mathamagic.

    Only open code I know for this is Jame's "Laserboy" source.

    Its not talked about much in modern industry, its assumed to be in the software already. The ILDA definitions website I was going to send you to is down.

    Or just buy a license to say ILD-SOS or Utopia or download compiled Laserboy.

    Simple image processing mathamagic is skill worth learning. There is lots of 3x3 and 9x9 stuff on the web.


    I'd help you more, but I'm so jammed its not funny. Its a save the job funding thing.. I work in PhD level research. I post on PL to keep my laser friends and keep my sanity. I still do the odd show, and I repair hardware for folks.

    OK, Laser friends. Please help him out, send him some open source frames, links to Sergey's stuff etc...

    "The exercise is left to the reader"

    The website linked implies you have small angle, 20K PPS scanners. Reduce the projected image size with potentiometers wired into the Ilda cable., not in software, if you can.
    That way you do not loose DAC resolution.

    Smaller image global scan angle somewhat equals much faster scanning. You may be pushing the projectors angle too much. Thats part of the art side, knowing when...

    I'm a hardware guy, not a coder...
    Too many people buy the code instead of cut it now, so the graphic arts / scanner technical knowledge is art part is declining.

    Steve
    Last edited by mixedgas; 10-24-2012 at 16:18.

  5. #5
    Join Date
    Oct 2011
    Location
    Graz, Austria
    Posts
    43

    Default

    Hey Steva.

    Thanks for the help. But all these software packages are not usefull for me. This is because I only draw very simple stuff and the data within my software is available as line path. So I have to fix my path with corner, anchor in guidance points before I send it to the laser. Most available software packages are standalone graphic editors and not a simple DLL that I could use as a third-party component in my software.

    I will work a bit more on that

    Matthias

  6. #6
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    2,197

    Default

    LaserBoy does not use any kind of matrix math.

    If optimization is applied to a frame, first every lit segment is considered separately and a formula is applied that finds the order of the least distance to draw the segments. Segments can be reversed if necessary to achieve this goal. Then each consecutive point is examined in the context of three points at a time to see what the simple 2D angle is as defined by the three consecutive points and a varying number of dwell points are added as a function of the acuteness of the angle from zero to 180 degrees.

    James.
    Last edited by james; 10-25-2012 at 16:46.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOS and Linux (including Raspberry Pi!).
    Download LaserBoy!
    YouTube Tutorials
    Ask me about my LaserBoy Correction Amp Kit for sale!
    All software has a learning curve usually proportional to its capabilities and unique features. Pointing with a mouse is in no way easier than tapping a key.

  7. #7
    mixedgas's Avatar
    mixedgas is offline Creaky Old Award Winning Bastard Technologist
    Infinitus Excellentia Ion Laser Dominatus
    Join Date
    May 2007
    Location
    A lab with some dripping water on the floor.
    Posts
    10,119

    Default

    Alternative idea, for any two sucessive points, the Slope = Rise over Run = M = Y2 -Y1 over X2 - X1.

    Watch out for divide by zero errors, but if slope is approaching a limit for close together points, then see if a direction change has occured. If that happens, add N points. Then have a minimum distance before you check the slope again, IF you have added points.

    I prefer James' idea of simple triangle geometry.

    You may find some ideas here:

    http://www.photonlexicon.com/forums/...ghlight=sergey


    Steve
    Last edited by mixedgas; 10-25-2012 at 17:30.

  8. #8
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    2,197

    Default

    Look up the atan2 function.

    http://en.wikipedia.org/wiki/Atan2

    It gives you simple direction.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOS and Linux (including Raspberry Pi!).
    Download LaserBoy!
    YouTube Tutorials
    Ask me about my LaserBoy Correction Amp Kit for sale!
    All software has a learning curve usually proportional to its capabilities and unique features. Pointing with a mouse is in no way easier than tapping a key.

  9. #9
    Join Date
    Oct 2011
    Location
    Graz, Austria
    Posts
    43

    Default

    Thanks everyone for the tips and tricks. I liked the other thread that Steve posted me to.

    The demo version of Mocha.NET (from Showtacle) includes a nice tool called "Quazar" which gives a nice input how to construct helping points. Two friends of mine who are mathemtical genius are helping me on path optimization. We will probably use the theories of "traveling salesman", "ant colony" in combination with "genetic algoritm". I'll post a sample application once we are done.

    Mat

  10. #10
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    2,197

    Default

    Finding the shortest path is not as difficult as you might think. First you have to pick what will be your first lit segment, then you just look at the ends of every other segment in the frame and jump to the one that is closest to the end of the segment you just left. Like I said, you might have to reverse the direction a segment is drawn for best results.

    Also, if you have three points in space, that defines a plane; even in 3D space. It also defines a triangle (always 2D). If you know the distance between all three points, you know the lengths of all three sides of the triangle. You can calculate the angles. You really only need to know one of those angles. The three points you look at are consecutive points in a frame. The one in the middle is the one you calculate the angle for and that will tell you if you need to add dwell points.
    Last edited by james; 10-28-2012 at 15:53.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOS and Linux (including Raspberry Pi!).
    Download LaserBoy!
    YouTube Tutorials
    Ask me about my LaserBoy Correction Amp Kit for sale!
    All software has a learning curve usually proportional to its capabilities and unique features. Pointing with a mouse is in no way easier than tapping a key.

Posting Permissions

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