sketchucation logo sketchucation
    • Login
    1. Home
    2. Regular Polygon
    3. Posts
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🔌 Smart Spline | Fluid way to handle splines for furniture design and complex structures. Download
    R
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 9
    • Posts 88
    • Groups 3

    Posts

    Recent Best Controversial
    • RE: [Plugin] Superellipse 1.2

      @unknownuser said:

      Really nice... but it reminds me... I used to use POV-Ray some years ago, in which it was possible to create a 3d-superellipsoid.
      Could you make that??? 😄 would be so awesome, I used to use it a lot!
      Perhaps in SU it would need a variable for level of detail, though...

      Thanks, glad you like it. Funny you should ask because, in fact, I do have a superellipsoid plugin. It lets the user enter the number of lines of latitude and longitude to control the level of detail.

      It was interesting to see how POV-Ray is dealing with the exponents in the formula. They let the user specify a Roundedness value, whereas I came up with a Squareness value. I'll have to try out both approaches to see which I like better.

      Anyway, I should get the superellipsoid plugin polished up, and posted on my blog, sometime next week. Stay tuned!

      posted in Plugins
      R
      Regular Polygon
    • RE: [Plugin] Superellipse 1.2

      Hey, thanks everyone for the big welcome, and your show of support, for this first -- albeit simple -- plugin.

      posted in Plugins
      R
      Regular Polygon
    • RE: [Plugin] Superellipse 1.2

      I have just released a new version 1.1 of the Superellipse plugin. This version allows you to specify the "squareness" of a superellipse using a scale. The exact association between the scale and the squareness is spelled out in gory detail in the post on my blog. But a picture is probably worth a 1000 words.

      scale 8.PNG

      Basically, 0 corresponds to an ellipse, 100 corresponds to a rectangle, and a scale factor of 50 corresponds to a superellipse that stretches 50% of the way in between. I think this makes assigning a squareness value fairly intuitive.

      You can run both versions (1.0 and 1.1) at the same time to compare them. To download the plugin, or read more about it, please visit my blog at http://regularpolygon.blogspot.com/

      Thanks.

      posted in Plugins
      R
      Regular Polygon
    • RE: [Plugin] Superellipse 1.2

      @thomthom said:

      Is "Regular Polygon" a reference to Flat Land?

      No, not really.

      "Regular Polygon" is kind of a play on words. It could mean an ordinary, everyday, run-of-the-mill polygon (i.e. the basic element of 3D graphics). But, in the mathematical sense, it means a symmetrical polygon whose angles and edges are all equal.

      posted in Plugins
      R
      Regular Polygon
    • RE: [Plugin] Superellipse 1.2

      @remus said:

      A quick question about using values of n<1 if i may: how do you handle it, because surely you'll end up trying to take roots of negative numbers.

      Here is the code that computes the coordinates.

      
      def sgn(num)
        return  0  if num.zero?
        return +1  if ( num > 0 )
        return -1
      end
      
      
      # Compute the points for the vertices of the superellipse
      def points
        e = 2.0 / @exp
        pts = []
        delta = 2 * Math;;PI / @edges
        for i in 0...@edges do
          phi = i * delta
          x = @a * sgn(Math.cos(phi)) * Math.cos(phi).abs**e
          y = @b * sgn(Math.sin(phi)) * Math.sin(phi).abs**e
          pts.push([x, y, 0])
        end
        pts.push(pts[0])  # close the loop
        pts
      end
      
      

      The only trick is to take the absolute value before you raise a number to a fractional power. After that, multiply it by +1 or -1, depending on the sign the original number had.

      posted in Plugins
      R
      Regular Polygon
    • RE: [Plugin] Superellipse 1.2

      @su reviewer said:

      As of now its pretty much a shot in the dark as to how square the superellipse will come out. Perhaps having a scale of 1-100 (100 being a perfect square) the plugin would be more manageable?

      Otherwise great plugin!

      Thanks for your review!

      I can see your point. It is not real intuitive to me either how square the superellipse will be for a given exponent value.

      We could replace the exponent with a scale that runs from 1-100. If 1 represents a completely round shape, then we would associate it with an ellipse. At the other end, 100 represents a completely square shape, so we associate it with a rectangle. But it is not so obvious to me what the numbers in the middle represent. Which superellispe should correspond to a scale factor of say 50?

      posted in Plugins
      R
      Regular Polygon
    • RE: [Plugin] Superellipse 1.2

      @unknownuser said:

      Next Will be Super Cycloïd? ☀

      Yeah, that sounds like a plugin I would work on. They tend to have that sort of mathematical flavor.

      posted in Plugins
      R
      Regular Polygon
    • [Plugin] Superellipse 1.2

      Hi everyone,

      First of all, let me say that this forum has been a helpful resource. I have often found answers for my own plugin development problems already addressed here. It is also interesting to follow the continuing evolution of new SketchUp plugins posted here.

      I wrote a few plugins over the years that are just languishing on my hard drive. My plan is to write them up on a blog, and then announce them on your forum.

      This first plugin draws a superellipse. It is pretty simple, but as far as I know it hasn't been done before. A superellipse is a shape that is in between an ellipse and a rectangle, (or a circle and a square, if both axes are equal). For example, here is a cube with superellipse shaped windows.

      superellipse 1.PNG

      A parameter, n, controls the degree of "squareness." As n gets larger, the curve looks more and more like a rectangle with rounded corners.

      superellipse 2.PNG

      ` # CHANGELOG

      1.1 - June 23, 2010

      * Implements new scale to describe squareness.

      1.2 - July 7, 2010

      * Remembers last dialog box values between sessions.`

      The Superellipse plugin is at: regularpolygon.org/plugins/superellipse.php.

      Thanks.

      posted in Plugins
      R
      Regular Polygon
    • 1
    • 2
    • 3
    • 4
    • 5
    • 5 / 5