View Full Version : Crazy Maths - Anyone good at trig?
barrie.sharp
2010-05-26, 03:59 PM
I am creating a parametric family with an adjustable angle. Finding the opposite value is easy but I have a radial fillet between the angles set to a radius of 90mm. I want to find the new Top on the arc. The radius relates to the angles as a tangent but it's beyond me how you would calculate that to find an offset.
Anyway, if that makes no sense at all, I'm trying to find the value of 'Top' (see attachment)
Major kudos to whoever knows the answer, it scares me!
twiceroadsfool
2010-05-26, 04:25 PM
Do a goolgle search for Wolfram, or any dissection of a circle.
Youll need another chord (endpoint to endpoint of the circle), and then youll be able to backtrack to the value of whats considered "t" and "h" (radius to that chord, and that chord to that circles tangent). Then you can add that to the parameter for the distance between the two horizontal references, and youre good to go.
Alfredo Medina
2010-05-26, 04:37 PM
I hope you have 2011. If you do, make the fillet arc, add a parameter to control its angle, then add a dimension from the bottom plane to the top middle point of the fillet arc. The illustration shows an example of how the reporting parameter updates when the Angle and the FilletAngle parameters change.
twiceroadsfool
2010-05-26, 04:47 PM
Thats what im HOPING to use Reporters for originally, butits only going to fly if youre touching one of the hosting elements, i believe....
barrie.sharp
2010-05-27, 10:53 AM
Thanks chaps. I'll look at the wolfram results. As for the reporting parameter, I was hoping that would help and I did set one up successfully. However, I can't use it to drive a parameter for controlling a Ref Plane because 'A repoting parameter can be used in a a formula only if its dimension references are all to host elements in the family' apparently.
Any ideas what that means?
Scott Womack
2010-05-27, 11:02 AM
Reporting parameters can only be used in formulas, if both ends are to "host" geometry. For instance, I typically lock named reference planes to both sides of a wall in a wall hosted family. Therefore a reporting parameter if taken off of those reference plans cannot be used in a formula. but one where I tabe, to get ti to the wall surfaces itself CAN be used in a formula. Not sure if this helps.
DoTheBIM
2010-05-27, 01:07 PM
Plug this in... see if it works.
Top = Opposite - ((Angle Radius * tan(Angle)*cos(90-Angle))-(Angle Radius-(Angle Radius * cos(Angle))))
Might need some more in-depth look if it don't work. Attach the family if possible.
DoTheBIM
2010-05-27, 01:30 PM
My bad... Got copy/paste happy with Angle Radius. I corrected the formula to show Angle where applicable.
twiceroadsfool
2010-05-27, 01:52 PM
Thanks chaps. I'll look at the wolfram results. As for the reporting parameter, I was hoping that would help and I did set one up successfully. However, I can't use it to drive a parameter for controlling a Ref Plane because 'A repoting parameter can be used in a a formula only if its dimension references are all to host elements in the family' apparently.
Any ideas what that means?
It means you cant DRIVE something with a Reporter, unless the Reporter only touches the HOST objects (Think door frame, and throat depth). Its the reason i wouldnt go Reporter for what youre after. The math takes a few minutes to figure out, but it works correctly all the time. So you dont have to teach people "use reporters... oh, unless they dont work."
Hopefully soon Reporting parameters can go anywhere, and then we'll be one HUGE step closer to a true fully intelligent model,
barrie.sharp
2010-05-27, 03:04 PM
Plug this in... see if it works.
Top = Opposite - ((Angle Radius * tan(Angle)*cos(90-Angle))-(Angle Radius-(Angle Radius * cos(Angle)))
Might need some more in-depth look if it don't work. Attach the family if possible.
Thank you from the pit of my stomach! I wish I understood how you worked that out but I'm glad you did. FYI you need another ')' on the end. Plus, I had to add +0.1 because I think the accuracy can't keep up.
For anyones morbid interest, I have included the family that I was attempting to make. I'm relatively new at family creation and I would love some pointers on how to refine this. I had to nest the tile twice to get pitch and roll. I wish you could just rotate objects on any axis! I'm sure I could have hosted a ref line on another to contain them in one file but I didn't have time to watch it break. Modelling the tile itself was tricky for my level of xp. Especially since I don't have anything but photos to go on! :beer::beer::beer::beer::beer:Drinks all round! The forum would only let me buy five so I'll have to sit this one out!
Hang on, five is enough!
DoTheBIM
2010-05-27, 03:28 PM
Thank you from the pit of my stomach! I wish I understood how you worked that out but I'm glad you did. FYI you need another ')' on the end. Plus, I had to add +0.1 because I think the accuracy can't keep up.! I actually have a similar math conundrum in a family that I couldn't work out yet or had the time to. Your example gives me an idea though now... In mine the peak of the curve did not stay centered, nor did it have the straight lines for the angles...so it added an additional level of trickery that for some reason my brain failed to navigate. 'Course I never thought of asking AUGI for help like you did.
If you understand basic trig & "working out" equations...I could probably walk you through it if you wanted.
I corrected the formula in my orignal post for the ) in case anyone else comes by and needs to use it.
You should not need to add anything to the formula like 0.1. It's likely your dimension is rounding giving you a rounded result and not the "true" (most precise) result. You'll probably find at certain sizes by adding 0.1 it will give you the opposite effect of what your trying to achieve with adding 0.1. If you "need" the value rounded a certain way for scheduling purposes or similar, that's a whole 'nother can of worms that already been opened and dumped out.
...Hang on, five is enough! I'm gonna need all 5 for this weekend. ;)
barrie.sharp
2010-05-27, 03:42 PM
If you understand basic trig & "working out" equations...I could probably walk you through it if you wanted.
Basic is certainly the word but I can handle triangles, just never had to play with circles too! If you could walk me through anything it would be a great help. Then, in fifteen years time I might be able to figure out an equation for you in return!
You should not need to add anything to the formula like 0.1. It's likely your dimension is rounding giving you a rounded result and not the "true" (most precise) result. You'll probably find at certain sizes by adding 0.1 it will give you the opposite effect of what your trying to achieve with adding 0.1. If you "need" the value rounded a certain way for scheduling purposes or similar, that's a whole 'nother can of worms that already been opened and dumped out.
The 0.1 discrepency is reported in the parameter which I don't think is rounded. Anyway, the reason I had to add the 0.1 is because the cutting void is set to the calulated height. Without the 0.1 addition Revit can't keep it joined and the cut fails. That's when I checked the precise value of the reporting dim. If you edit the tile and remove the 0.1, you'll see what I mean.
Seriously, Thanks for your help. That kind of maths will get me through many more families!
DoTheBIM
2010-05-27, 06:28 PM
Thought it'd be easier to just attach my chicken scratch... to attempt explaination. If you don't understand something feel free to ask. I numbered it to attempt to show my steps. I started with the area on the right.
Being a circle is really a non-issue since we're just breaking the circle down into triangles anyway.
I see what you mean with the .1 issue now that I've looked at your family. Normally if I'd run into something like that with no way of making revit happy. I'd simply hide the .1 in a dimension on the sketch line of the void object extrusion.
Interesting family anyway. Would be curious to see how it's used in a project and what is the end goal of developing it.
Wes Macaulay
2010-05-27, 07:10 PM
Awesome thread. As your parents may have told you, never cosine alone.
eric.piotrowicz
2010-05-27, 08:47 PM
Haha nice one Wes :beer:
barrie.sharp
2010-05-28, 09:35 AM
Thought it'd be easier to just attach my chicken scratch... to attempt explaination. If you don't understand something feel free to ask. I numbered it to attempt to show my steps. I started with the area on the right.
Being a circle is really a non-issue since we're just breaking the circle down into triangles anyway.
I see what you mean with the .1 issue now that I've looked at your family. Normally if I'd run into something like that with no way of making revit happy. I'd simply hide the .1 in a dimension on the sketch line of the void object extrusion.
Interesting family anyway. Would be curious to see how it's used in a project and what is the end goal of developing it.
The use is explained in this post http://forums.augi.com/showthread.php?t=119063
It is also a learning excercise to explore intelligent family creation. I have put basic families together but it's this sort of formula creation that'll make flexible sketches. This hip didn't need to be flexible for this one occasion but I want to be able to develop it further for experience because the hip tiles do come in different specs.
I have attached my example of use. The family is still rough but it'll get there. Thanks for your working out. I have included a draft view with it drawn up. Can you check that I copied it right? I tried to go through and understand each bit and typed it as I understood it whilst comparing it to your parameter freindly version. I used 2*theta for the chord and dropped the half cos. Don't know if i'm right doing that so let me know.
It really helped me get to grips with it. It is quite simple when you break it down. I think my issue has been that I am hesitant to get stuck in and keep looking for a quick answer. I will remake the tile at some point and do it properly, I stuggle to break down the geomerty into simple forms and voids. I'll post my progress when I get round to it.
barrie.sharp
2010-05-28, 11:33 AM
Started work on a remake. The tile is dumb but I'm trying to combine pitch and roll to be controlled in one family. I'm struggling to work out what I should constrain the roll dimension to.
I have drawn a pitch line, then hosted a ref line on top to controll roll, then hosted tile on that. The pitch works and the roll worked if you just drag the end point. I can't constrain the roll with a parameter.
I assume this is because the level plane isn't hosted by the pitch so I tried another ref line but the parameter moved the base line and not the roll line.
Any ideas or does everyone else have to use another level of nesting?
DoTheBIM
2010-06-02, 07:16 PM
Sorry about the delay... I was on vacation... with no internet access.:shock: It was awesome.
Thanks for the links.
...Thanks for your working out. I have included a draft view with it drawn up. Can you check that I copied it right? I tried to go through and understand each bit and typed it as I understood it whilst comparing it to your parameter freindly version. I used 2*theta for the chord and dropped the half cos. Don't know if i'm right doing that so let me know...
I haven't had a chance to check your math but if it plugs into the family and and gives you what you need it should be right.
...Any ideas or does everyone else have to use another level of nesting?This is the point where I'd pobably do things a bit differently than most.... I'd probably put the array in a line based family as you did but I'd simply control the pitch via one angle parameter, calc the length of the array family or simply calc the quantity of the array directly in the top level famly and measure the angle in the project and set it in the family as needed. If I wanted to make it a bit easier for users I'd probably put in two parameters for each slope and calc the compound angle for them based on their input into the pitch parameters. That just how I'd do it though. Not sure how dual pitch might effect your need to "roll" though in that case. As nice as it would be to use pick line for a line base family and automatically have it stretch to the right length, I've not had much luck getting it to come in oriented right the first time. Same problem as I've had with using the facia tool on hips and valleys.
barrie.sharp
2010-07-13, 09:53 AM
New family I'm trying to create which is so similar (mathematically) that I'm frustrated that I can't do it myself. I have attached my frame. I need to calculate r based on W to make my circle intersect. I can then define the arc by its height and not radius. The answer isn't jumping out at me but I WILL kick myself when I find out!:roll:
DoTheBIM
2010-07-13, 11:41 AM
If you know anything about Pythagorean theorem get ready to kick yourself (that is if all the parameters you have in there are known except for R.
r^2+(.5W)^2 = R^2
solved for R...
R = (r^2+(.5W)^2 )^.5
barrie.sharp
2010-07-13, 12:21 PM
If you know anything about Pythagorean theorem get ready to kick yourself (that is if all the parameters you have in there are known except for R.
r^2+(.5W)^2 = R^2
solved for R...
R = (r^2+(.5W)^2 )^.5
I don't believe it!! Not that old chestnut! [TWACK!]
Somehow I knew you would give me the answer. Thanks:beer:
One more thing though. I can't derive r using Arc H without getting a circular chain :shock:
DoTheBIM
2010-07-13, 12:27 PM
that's why I said "if all are known except R"
little r had to be known as well.
so it sounds like your question should of been how to solve for R based on W and Arc H (r is not known). Is this correct?
barrie.sharp
2010-07-13, 12:35 PM
that's why I said "if all are known except R"
little r had to be known as well.
so it sounds like your question should of been how to solve for R based on W and Arc H (r is not known). Is this correct?
Hands up. You have me there. r is the question:Oops:
DoTheBIM
2010-07-13, 12:50 PM
See if this might be of any help?
http://www.mathopenref.com/arcradius.html
barrie.sharp
2010-07-13, 12:56 PM
See if this might be of any help?
http://www.mathopenref.com/arcradius.html
You are a star! That's a great site. Apparently I have to spread some rep before I can big you up but I won't forget your help. :p
barrie.sharp
2010-07-13, 01:36 PM
In the interest of sharing I have attached the final framework for an arched lintel (or whatever you would want it for).
If you appreciate this contribution, give DoTheBIM some good rep.
DoTheBIM
2010-07-13, 02:19 PM
Actually my rep says I'm a beam of light rather than a star ;)
Thanks Barrie. No biggie on the Rep... I ran out of rep giving too for certain members as well.
Wes Macaulay
2010-07-13, 04:03 PM
Heh - that intersecting chords theorem is really awesome. Much easier than the approach I've used up till now :shock:
barrie.sharp
2010-07-13, 04:22 PM
Actually my rep says I'm a beam of light rather than a star ;)
It says that Wes is the star! This thread can be quite confusing ;)
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.