News:

The purpose of these forums is to discuss TurboCAD.  Please keep the discussion of other products to compatibility issues or how the other software can be used with TurboCAD.

Main Menu
TurboCAD 2026 Platinum box
Now available

TurboCAD 2026.2

The latest update for TurboCAD 2026. It installs over any 2026 build and keeps your activation, drawings and settings. Get it from the Start Page or Help > Check for Update.

Maths question

Started by Andy H, April 25, 2016, 12:36:37 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Andy H

Hi all, this is related to TC (honest).

In the attached I'm trying to find a calculation (or two) to determine the  length of the rays at the points marked (the rays are at 5 degree intervals), then I need to reverse the calculation to get the corresponding inner numbers i.e. 5 = 5). the diameter of circles for example could be 10 mm for inner one,  and 5 mm for outer

The biggest problem I have is that I've no idea what to call things when I do a google search (and I've done a lot of searching), I also don't know if there is a special name for the shape of the arc required, if anyone has any ideas as to what I need to type into google I can do some more searching for the calculation, I guess its similar to an Epicycloid but that doesn't work.

Thanks

Henry Hubich

Why calculate? Draw in TCad and read the lengths in the Selection Info palette.

Henry H

Andy H

Hi Henry, yep, I probably should have explained the reason for the calculation.

Basically its RedSdk's texture rotation, what happens is that if one rotates the texture, it is no longer symmetrical on the object,  there is a way round it using the new wrapping space, but I thought I'd write a bit about Red for the wiki, and I'm going through each control (fun eh!).

Anyway, leaving aside the new centre option, when its rotated the texture then has to be 'offset v' by the ray length and 'offset u' by a corresponding radius of the inner circles (and vice versa), just trying to write up how it works, and also I wrote a simple program (similar to Darrel's but with some variation) and I need to program the calculations into it rather than  have a 360 x 2 matrix.

That's the theory - no idea if I can figure everything out about Red.

John R

Andy, the "Offset U" & Offset V" options are a "Percentage" factor. "0.5" for 50%. I think I saw somewhere that the center of an image is at a "Left" corner, but unsure if it was "Top" or "Bottom". "0.5" in both fields should put the image in the middle.

Talk to Darrel or Dean, they're the only ones that know anything about RedSDK.
John R.

V17—V21, 2015—2025
Designer, Deluxe, (Basic, Expert, Professional), Platinum
RedSDK enabled
Windows 11 Pro (25H2), 64-bit

Andy H

Hi John, yep the 0.5 and 0 are for orthogonal textures, but the rotation slider throws all that out the window  ;D

From experiments it lock the centre of the texture to the top right corner, hence 0.5 brings it back halfway, I think writing about Red will take me quite a while.

Saltgrass

#5
Looks like you are looking at a bunch of right triangles.  You know the length of one side and all three angles and are looking for the length of the hypotenuse..

If that is the situation, I will check for formulas.

Maybe something like c = b/sin B  Where c is hypotenuse, b is 45 and the angle B is 90-origin angle. 

For instance, if you use the 5 degree line, it would be

c = 45\sin (90-5)  >> c=45/sin 85  >> 45/.9962  >> c = 45.17189

I hope the math is close, it has only been 45 years...  ;D

At the 45 degree line, c = 45/sin 45  c= 45/.707  c = 63.64
Clark
TC2015 Platinum

Henry Hubich

#6
Have a look at the attached screenshot -- and please don't be shy about pointing out any errors you see.

Henry H

Saltgrass

Henry, I am not sure about how you describe h.  But α should be 45°?  I would have to get another book to check arcsin.

If you are looking for the length of the chords for origin to circle, an Isosceles triangle can also be used with the sine formulas and doubling the value obtained for the base.  This is pretty much what Henry is doing.



Clark
TC2015 Platinum

Henry Hubich

Quote from: Saltgrass on April 25, 2016, 06:43:31 PM
Henry, I am not sure about how you describe h.  But α should be 45°?  I would have to get another book to check arcsin.

If you are looking for the length of the chords for origin to circle, an Isosceles triangle can also be used with the sine formulas and doubling the value obtained for the base.  This is pretty much what Henry is doing.

Yup, you're right. That makes it unnecessary to calculate it. Disregard the arcsin formula; the others should be correct.

Henry H

Andy H

Thanks Clark and Henry,  I haven't got it working yet.

I think I looked at too many equations on the internet and confused myself (easily done), I'll leave it for a few hours and try again later. 

Andy H

#10
OK, had a nap, then food, got some beer, now happily back to this  :P

Clark -  sorry you lost me, but you gave me some useful pointers.

Henry - sorry I  messed up as the results don't match the drawn figures, substituting the real world figures for Red which are 1 unit x 1 unit,  (resulting in a corner to corner radius of 0.353556) I get Bn = 45 degrees - (5 * 8 (for the 40 degree a angle)), then 2 * 0.353556 (my radius) * COS(Bn (5), I've obviously gone wrong somewhere as the figures aren't right - but haven't figured out where.

The result (as drawn in TC) should be 0.5416 but I can't match that figure.

Anyway I looked at an alternative triangles and found one I could adapt, so drew it in TC and it seems to work, (at least for offset v), I am interested to know where I went wrong with your formula, and I gotta work out doing offset u now  :-\

Thanks

Saltgrass

#11
Andy, I seem to have a difference of understanding concerning the size of the circles.  Are the Red Squares 45x45, whatever units those are?

The diameter of the two circles on the left are 64.64, which is the length of the 45° ray.  I haven't tried the other formula but I need to know if we are even on the same page.

Reference:  Law of Sines..

https://en.wikipedia.org/wiki/Law_of_sines

Henry and I both get the length of the ray at 40° to be 48.75..
Clark
TC2015 Platinum

Saltgrass

#12
It also looks like the first Ray in you new drawing would be ~ .5417.  Which does seem logical if the first ray is .5

Clark
TC2015 Platinum

Henry Hubich

Quote from: Andy H on April 26, 2016, 03:33:10 PM
OK, had a nap, then food, got some beer, now happily back to this  :P

Clark -  sorry you lost me, but you gave me some useful pointers.

Henry - sorry I  messed up as the results don't match the drawn figures, substituting the real world figures for Red which are 1 unit x 1 unit,  (resulting in a corner to corner radius of 0.353556) I get Bn = 45 degrees - (5 * 8 (for the 40 degree a angle)), then 2 * 0.353556 (my radius) * COS(Bn (5), I've obviously gone wrong somewhere as the figures aren't right - but haven't figured out where.

The result (as drawn in TC) should be 0.5416 but I can't match that figure.

Anyway I looked at an alternative triangles and found one I could adapt, so drew it in TC and it seems to work, (at least for offset v), I am interested to know where I went wrong with your formula, and I gotta work out doing offset u now  :-\

Thanks

See if this helps, Andy:

Angle a = 45°
Radius r = .3536
First angle bn = 45°-5° = 40°
First length Ln = 2*.3536*cos(40°) = .5417

Second angle bn = 45°-10° = 35°
Second length Ln =2*.3536*cos(35°) = .5793
............
............
Ninth angle bn = 45°-45° = 0°
Ninth length Ln = 2*.3536*cos(0°) = .7072 (This is the line that forms the diagonal of the lower left-hand red square.)

Henry H

MinInMission

Very interesting and a perfect way to illustrate how much I have to learn!!

Thanks, I love that stuff.

Andy H

#15
Thanks Henry and Clark.

Henry - following your figures I finally figured out what I was doing wrong, I was using MS Excel and I was converting the 5 degrees to Radians before doing anything with it, instead of converting just the (45-5) to radians within the COS() formula, altered it and your method works perfectly.

Clark - my error, I rounded down instead of up for the 0.541676, also my apologies for confusing things, the 45 in my first drawing is rotation angles not radius ( good job I'm not a teacher  ;) ), basically as offset v increases from 0 to 45 degrees (the 'bottom' angles), offset u calculation decreases  the 5 to 45 circles, the numbers on the circles were just there to remind me which circle belongs to which v angle, when v calculates to 0.541676 units the u circle is 0.454519 units (radius),

MinInMission - I've certainly loads to learn - I never needed anything like this as a gas man.

Thanks again
Andy