Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

How to model a SQUIRCLE

zpaolo

Member
A "squircle" is a funny term to describe a sort of square with rounded corners that's not a square nor a circle. The formula for a squircle, which is in fact a superellipse, is in its simpler implicit formulation:

X^4+Y^4=1

I don't know if you can mathematically describe this surface with NURBS (like conics that just need a degree 2, two control points NURBS with proper weight), anyway I couldn't build a squircle using sketched splines, probably because you can't add weights.

I tried with datum curves from equation, in cartesian form:

x=t
y=(1-t^4)^(1/4)

and although the shape is nice, the curvature is all bubbly and irregular. I also noticed that even a simple circle parmetrized in this way has an irregular curvature. If you describe a circle as a function of angle than the curvature is ok, but again if I apply the same reasoning to squircles:

x=cos(t*90)^(1/2)
y=sin(t*90)^(1/2)

curvature is not smooth.

So in the end the question is, is it possible to model such a shape in CREO? Oh I don't have ISDX to check :(

Paolo
 
Oh well seems like I found the solution already :D

Instead of using a cartesian datum curve I used a polar one with this formula:

theta=t*90
r=(1/(cos(theta)^4+sin(theta)^4))^(1/4)
z=0

and now the curve is smooth and curvature is perfect too. Long live the squircle!
 
But of course if you project, extrude, VSS or boundary blend with this kind of datum curve the curvature of the projected curve, or the curvature of the surface has a different profile that looks like straight lines connected instead of a smooth arc. Pretty strange but probably caused by reparametrization :(
 
like it. or sweep a square into a circle using trajpar & graph features. Paolo. I don't think we can read in equations in ISDX like we can in the curve tool. I do offer a work around using the style tool over the shape you read in w/ equation hover it is G2 or higher math y=x^5 or greater my approximation is not right on yours. email or upload your file. [email protected] ill make an example.
 
I can't upload files or send it by email, very strict rules at my current workplace. Anyway I went on studying the subject of 4th order superellipse, just for the sake of experimenting (less Creo related stuff following).

On a website (have to re-check it) they said you can model a superellipse with a 3rd order NURBS and proper weighting, of course it's true but not if your superellipse is 3rd or 4th degree ;D

I tried to use Mathcad to best fit a 3rd degree superellipse with a 4th order NURBS, with a vector like this:

1,0
1,1
1,1
0,1

with two coincident control vertex and a weight vector like this

0
0.47494
0.47494
1

it gave me, in polar coordinates, a radial error of +/- 0.00015 over a radius varying from 1 to 1.12, which is a very nice result although it's not as "fit" as with conics (where the error is in the order of 10^-12 or less).

Paolo
 
I got my hair cut yesterday and was sitting quietly in the waiting room. I noticed some of the bottles for sale on the counter and was thinking of you Paolo. I'll try to locate a screenshot of that if I can locate it online. It was a cool shape and I would do that part with a trajpar graph feature combo. The trick there is to get your SQUIRCLE feature to flex from one to the other as a sketch. Il try to read in the dtm curve from equation today.
 
I noticed some of the bottles for sale on the counter and was thinking of you Paolo.

:D I'll tell you the truth: I'm always greatly inspired by the shapes of perfume and cosmetics bottles, a couple of years ago I modeled one of those "shape changing" bottles that was very popular
( Lancome perfume bottle by zpaolo on DeviantArt ) and I was playing with other shapes recently in my coffe break.

If you have a picture of that bottle, share it :)
 
I spent a bit looking over that file on your profile, the glass perfume bottle or what ever it is. In my one week surfacing class we cover those trajpar examples complete with graphs. I have new ones that feature-ize cross sectional area etc. Im really pushing those tools for an up and coming class. I will post a photo today or tomorrow. It would probably be faster to model it even tho the salon is 6 blocks.


I recreated your equation with curve and linked the image below that illustrates your concern of wiggling comb-plot or as we say the light would reflect oddly on your second option if the curve were to generate a surface.

equasion601.jpg

equasion602.jpg



In our WEEK 2 surfacing intensive we refit Style Curves over geometry generated from equations such as this 'mathematically driving geometry' so to slightly change how light reflects off the curves and surfaces. Style or ISDX will not generate mathematically from equation like this. Would it interest you to see this workflow?

The Conic tool inside of sketcher uses at RHO value or the Greek letter 'P'. That is the closest thing to y=X^2 as we get in Creo. In ISDX or Creo 3.0 style we can create y=X^3 thru y=X^12 geometry just like in Alias Auto Studio. Some may recall years ago we had these discussions on this forum. The site has since gone down and come back to life and those discussions may not be alive any longer.
 
Last edited:

Sponsor

Articles From 3DCAD World

Back
Top