We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2020-03-24 11:10 AM - last edited on 2022-09-26 10:52 PM by Daniel Kassai
2020-03-25 02:48 AM
x^2 + y^2 = r^2
x^2 / ( x_max )^2 + y^2 / ( y_max )^2 = 1
IF x^2 / ( x_max )^2 + y^2 / ( y_max )^2 # 1 then !false return equation of an eclipse theta = arctan ( y / x ) !angle of selected points r = ( a.b ) / ( sqr ( a^2 . ( cos ( theta ))^2 + b^2 . ( sin ( theta ))^2 )) !radius at any given point x = r . cos ( theta ) !x point of ecplise with given angle y = r . sin ( theta ) !y point of ecplise with given angle endIF
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2020-03-25 11:21 AM
values "pos_x" range [ , ] values "pos_y" range [ , ]lines? That's where I'm really struggling with it.
2020-03-26 02:50 AM
r = ( a.b ) / ( sqr ( a^2 . ( cos ( theta ))^2 + b^2 . ( sin ( theta ))^2 ))
JGoode wrote:
Thanks so much for your reply. I think I follow... is x_max equivalent to my A/2?
JGoode wrote:
How would I then implement this intovalues "pos_x" range [ , ] values "pos_y" range [ , ]lines? That's where I'm really struggling with it.
(+-) A/2 + cx = pos_x !cx = center x offset (+-) B/2 + cy = pos_y !cy = center y offset
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2020-03-26 11:39 AM
2020-03-26 01:14 PM
2020-03-27 02:33 AM
JGoode wrote:
What I'm trying to do is set the absolute minimum and maximum that pos_x and pos_y can be so when I move the hotspot, it can't be dragged outside of the circle / ellipse.
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2020-05-26 05:18 AM
IF x^2 / ( x_max )^2 + y^2 / ( y_max )^2 > 1
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2022-06-23 08:08 PM
This is super helpful in understanding the radius and angles of the ellipse! I'm personally looking to do something much more simple for a few objects Im editing. A few of the objects need just a curved line, and one needs a full ellipse.
How would the actual script of this ellipse look if I just wanted a 2D ellipse w/ fill capabilities? Would this just be plugging in the radius and x/y equations into something like a POLY_ command?
Thanks!
2022-06-24 03:28 AM
You cannot use the previous equations to draw an ellipse unless you are wanting just a straight line approximation using angular divisions or are actually just wanting something like a three point arch, maybe, since AC does not draw shapes based on equations but based on points and tangents. These equations are what you would use when you are defining hotspots in your object. You will have to stick with the suggestions in your other post regarding the actual drawing of the shape.
Ling.
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |