Page 22 of 27 FirstFirst ... 12181920212223242526 ... LastLast
Results 211 to 220 of 264

Thread: The LaserBoy Thread

  1. #211
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    1,357

    Default

    There is a blog conversation about a guy who wrote an app to analyse data on a Linux machine and wanted to share it with people in Windows. He observed problems when using MSVC++ compiler and GCC for Windows. That's where I found the compiler switches.

    -msse2 -mfpmath=sse

    I put these in both the Linux and the Windows Makefile, but it is redundant in Linux as this is part of the default settings.

    You cannot understate the meaning of "default" with GNU GCC. It is what compiles the Linux kernel. (Yes. I know that is a special case with special magic.)

    James.
    Last edited by james; 03-08-2019 at 16:55.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOSX and Linux.
    http://laserboy.org/code/LaserBoy_Current.zip
    http://theamerikans.org/LaserBoy

    http://laserboy.org/formatt/
    Ask me about my LaserBoy Correction Amp Kit for sale!

    Either do or do not do. There is no undo!

  2. #212
    Join Date
    Jul 2008
    Posts
    455

    Default

    Quote Originally Posted by james View Post
    There is a blog conversation about a guy who wrote an app to analyse data on a Linux machine and wanted to share it with people in Windows. He observed problems when using MSVC++ compiler and GCC for Windows. That's where I found the compiler switches.

    -msse2 -mfpmath=sse

    I put these in both the Linux and the Windows Makefile, but it is redundant in Linux as this is part of the default settings.

    You cannot understate the meaning of "default" with GNU GCC. It is what compiles the Linux kernel. (Yes. I know that is a special case with special magic.)

    James.
    I'm still a bit puzzled on how your app can make or break over how many angels can dance on the head of a pin.

    Just curious- what happens if you change the code from a <= pi to a < pi... does it still break in Windows w/o the magic
    compiler switches?
    Once milk has been poured over corn flakes, the clock starts ticking.

  3. #213
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    1,357

    Default

    I haven't tried that because it's not the right question. The value of pi radians means three points in a straight line. That and every angle less is exactly what i want to remove from the polygon.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOSX and Linux.
    http://laserboy.org/code/LaserBoy_Current.zip
    http://theamerikans.org/LaserBoy

    http://laserboy.org/formatt/
    Ask me about my LaserBoy Correction Amp Kit for sale!

    Either do or do not do. There is no undo!

  4. #214
    Join Date
    Jul 2008
    Posts
    455

    Default

    Quote Originally Posted by james View Post
    I haven't tried that because it's not the right question. The value of pi radians means three points in a straight line. That and every angle less is exactly what i want to remove from the polygon.
    pi radians cannot truly be represented in FP- please reconsider my request.
    Once milk has been poured over corn flakes, the clock starts ticking.

  5. #215
    Join Date
    Mar 2010
    Location
    Raleigh, NC
    Posts
    2,070

    Default

    According to this page
    https://docs.microsoft.com/en-us/cpp...6?view=vs-2017
    Visual C++ uses sse and sse2 by default.

    I am still trying to understand what it is about Windows you think is broken.
    I think we have at least determined that this is not a Windows problem as you initially asserted and has everything to do with code generation and is controlled by your GCC C++ compiler settings.

    You should check to see how this is handled in a javascript environment. Will Chrome give different results when running on a Mac, Windows, Linux, Android? What about IE, Edge, Firefox. They all have different engines, I think.
    You should also check .NET Core, which is cross platform, so runs on Windows and Linux, as well as others.

    Let me know what you find.

    What am I missing?

  6. #216
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    1,357

    Default

    Quote Originally Posted by dchammonds View Post
    pi radians cannot truly be represented in FP- please reconsider my request.
    Of course not. But if I use a trig function like atan2 and I give it coordinates that I know are in a straight line, I better get a double that is as close to pi as it can be. It should match (4 * atan(1.0)).

    To find the angle between any two lines that are connected at one end, you take the atan2 of each line and subtract one from the other as each atan2 call gives you the angle from the x axis to each line (in the case of XY coordinates). What you actually get is a number from negative pi to positive pi. So if the number is less than zero, I add two pi to it to get a number from zero to one epsilon value less than two pi. (Epsilon being the smallest difference in a double in the magnitude range of zero to two pi. A rotational angle of exactly two pi is the same as zero.

    If I'm looking for the convex polygon that surrounds a perfect square that has a whole lot of points along the straight sides, I don't want all those points. I just want the four corners. If I leave the value pi out of my comparison as in a < pi, rather than a <= pi, I would not be able to find and remove those points.

    I'm not saying that Microsoft is broken when it comes to double float math. It's just setup for speed of compilation and execution at the cost of precision. I am quite certain I could make my executable behave the same way in Linux as it does in the default behavior of Windows.

    Like the other James said, there are reasons for every different way it's done and each use case has its reasons for making the right choice.

    But you can't choose if you don't even know there is a choice to me made!

    We haven't even touched on the bizarre anomalies that arise from using integer coordinates in 3D space. You know it's pretty much impossible to draw a straight line with a lot of points along it in any direction other than parallel or perpendicular to the axis, Right? 2D images that get rotated around either of their coordinate axis (into the 3rd dimension) cannot be co-planer either. But that's OK. Because when you convert integer to double you have enough resolution in the numbers to deal with this. It's not an error. It's just the way it is.
    Last edited by james; 03-09-2019 at 08:53.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOSX and Linux.
    http://laserboy.org/code/LaserBoy_Current.zip
    http://theamerikans.org/LaserBoy

    http://laserboy.org/formatt/
    Ask me about my LaserBoy Correction Amp Kit for sale!

    Either do or do not do. There is no undo!

  7. #217
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    1,357

    Default

    Check this out. This is a video made from bmp files output from LaserBoy, put together using ffmpeg.

    http://laserboy.org/avi/centroid.mp4

    James.
    Last edited by james; 03-13-2019 at 14:48.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOSX and Linux.
    http://laserboy.org/code/LaserBoy_Current.zip
    http://theamerikans.org/LaserBoy

    http://laserboy.org/formatt/
    Ask me about my LaserBoy Correction Amp Kit for sale!

    Either do or do not do. There is no undo!

  8. #218
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    1,357

    Default

    New version!

    Let's just say I fixed it.

    There have never been this many changes from one version to the next.

    Full 3D clipping is now part of LB. You can turn on "destructive clipping" in the switch settings menu and when you move scale or rotate vectors out of bounds they get properly clipped right on the bounds of short integer space.

    Most of the effects functions have been re-written and some new ones added that make much better use of 3D space represented as double precision floating point numbers. I improved the normalizing functions and worked them into the menu system as well. Now the size and center of stuff in a frame or frame set can be easily manipulated to whatever you want. It can also clip 3D double space to fit inside of short int space. This makes some new effects possible like "explode", "flying" and "zoom".

    I also added frame set effects n_squared and n_cubed that copy whatever frame set you send to them into an n by n square or an n by n by n cube. So you can chew up your RAM exponentially.

    There is no longer a limit to the total number of vertices in a frame. If the number exceeds 65535 and you try to save as ild, it won't let you because it can't be done. So it offers to save your frames as LaserBoy formatted wave.

    If you open a bitmap file into the background of the display area it is now bonded to the XY plane at Z = zero and moves, scales and rotates with the view of 3D space.

    Also, as mentioned above, LB now calculates a 3D centroid for scaling and rotating vector objects on or around their own centers.

    There is a new main menu item n to call effects for the current frame, selected frames or the frame set. When calling the function, you can enter a name to save a file of the effect or enter nothing and the after effect frame set will be automatically loaded into the current frame set. Many of the effects functions now have prompts to enter parameters to control how the effect works.

    If you have ever tried LaserBoy, you really need to get this version!

    If you've never tried it, what are you waiting for? It's free and it's right here.

    James.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOSX and Linux.
    http://laserboy.org/code/LaserBoy_Current.zip
    http://theamerikans.org/LaserBoy

    http://laserboy.org/formatt/
    Ask me about my LaserBoy Correction Amp Kit for sale!

    Either do or do not do. There is no undo!

  9. #219
    Join Date
    May 2013
    Location
    Cherry Hill, NJ
    Posts
    126

    Default

    Quote Originally Posted by james View Post
    If you have ever tried LaserBoy, you really need to get this version!

    If you've never tried it, what are you waiting for? It's free and it's right here.
    I got started with laser scanning with LaserBoy and a Spencer's projector. What a learning curve! But worth it.
    LaserBoy is a pretty amazing piece of software, the new features sound cool, I may just try it out again, it's been a long time.

    A feature that would definitely get me into LaserBoy regularly is something like the trace feature of Quickshow/Beyond. I use that feature a lot, but then my frames are only available in QS/Beyond. I'd love to be able to get an ILDA frame by automatically tracing an image.

  10. #220
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    1,357

    Default

    Thanks!

    I've been working on it pretty much every day since the previous release back in early December.

    I didn't even come close to listing everything that was either fixed or added.

    3D vector clipping was a rather mind bending thing to figure out!

    James.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOSX and Linux.
    http://laserboy.org/code/LaserBoy_Current.zip
    http://theamerikans.org/LaserBoy

    http://laserboy.org/formatt/
    Ask me about my LaserBoy Correction Amp Kit for sale!

    Either do or do not do. There is no undo!

Posting Permissions

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