Small challenge
06-06-2017, 08:05 AM (This post was last modified: 06-06-2017 09:44 AM by Pekis.)
Post: #1
 Pekis Member Posts: 120 Joined: Aug 2014
Small challenge
Hello,

While making an Android app, I had to draw a small equilateral triangle pointing to a circle:

r: Outer Circle Radius: distance OAB
d: Side length of the equilateral triangle.
d=a*r, where a is a fraction of the outer circle radius

If we want the distance AB to be equal to 1/5 of r, what's the value of a ?

Have fun & Thanks for reading

Attached File(s) Thumbnail(s)

06-06-2017, 01:26 PM
Post: #2
 pier4r Senior Member Posts: 2,076 Joined: Nov 2014
RE: Small challenge
Nice one! I also have in the bookmark your "brain teaser 2" to solve.

Wikis are great, Contribute :)
06-07-2017, 09:53 AM (This post was last modified: 06-07-2017 09:57 AM by Pekis.)
Post: #3
 Pekis Member Posts: 120 Joined: Aug 2014
RE: Small challenge
Hello,

Here is the solution:

Distance AB = Distance AE + Distance EB

Distance AE:
d*cos(PI/6)
=a*r*sqrt(3)/2

Distance EB:
Arc height Formula r=h/2+c^2/(8*h),
Here h=Distance EB and c=d
=> Solved for Distance EB=r*(1-sqrt(4-a^2)/2)

Distance AB:
a*r*sqrt(3)/2+r*(1-sqrt(4-a^2)/2), which must be equal to c*r
(c=0.2 in the question)
=> Solve a*r*sqrt(3)/2+r*(1-sqrt(4-a^2)/2)=c*r
=> Solve a*sqrt(3)/2+1-sqrt(4-a^2)/2=c
=> Solved for a=(sqrt(3)*(c-1)+sqrt((c+1)*(3-c)))/2
If c=0.2 => a~=0.223694816
=> d will be approx. 0.22*r while the distance AB will be 0.2*r as required

If angle at B is t and (cx,cy) is the center of the outer circle with radius r:
Coordinates of A:
(Ax,Ay)=(cx+r*(1-c)*cos t, cy+r*(1-c)*sin t)
Coordinates of C:
(Cx,Cy)=(Ax+d*sin(PI/3-t),Ay+d*cos(PI/3-t))
Coordinates of D:
(Dx,Dy)=(Ax+d*cos(t-PI/6),Ay+d*sin(t-PI/6))

06-07-2017, 11:35 AM (This post was last modified: 06-08-2017 12:54 PM by PedroLeiva.)
Post: #4
 PedroLeiva Member Posts: 188 Joined: Jun 2014
RE: Small challenge
(06-07-2017 09:53 AM)Pekis Wrote:  Hello,

Here is the solution:

Distance AB = Distance AE + Distance EB

Distance AE:
d*cos(PI/6)
=a*r*sqrt(3)/2

Distance EB:
Arc height Formula r=h/2+c^2/(8*h),
Here h=Distance EB and c=d
=> Solved for Distance EB=r*(1-sqrt(4-a^2)/2)

Distance AB:
a*r*sqrt(3)/2+r*(1-sqrt(4-a^2)/2), which must be equal to c*r
(c=0.2 in the question)
=> Solve a*r*sqrt(3)/2+r*(1-sqrt(4-a^2)/2)=c*r
=> Solve a*sqrt(3)/2+1-sqrt(4-a^2)/2=c
=> Solved for a=(sqrt(3)*(c-1)+sqrt((c+1)*(3-c)))/2
If c=0.2 => a~=0.223694816
=> d will be approx. 0.22*r while the distance AB will be 0.2*r as required

If angle at B is t and (cx,cy) is the center of the outer circle with radius r:
Coordinates of A:
(Ax,Ay)=(cx+r*(1-c)*cos t, cy+r*(1-c)*sin t)
Coordinates of C:
(Cx,Cy)=(Ax+d*sin(PI/3-t),Ay+d*cos(PI/3-t))
Coordinates of D:
(Dx,Dy)=(Ax+d*cos(t-PI/6),Ay+d*sin(t-PI/6))

Can you provide a numerial example to test?. TYVM, Pedro
06-07-2017, 03:49 PM (This post was last modified: 06-07-2017 04:11 PM by Pekis.)
Post: #5
 Pekis Member Posts: 120 Joined: Aug 2014
RE: Small challenge
(06-07-2017 11:35 AM)PedroLeiva Wrote:
(06-07-2017 09:53 AM)Pekis Wrote:  Hello,

...

Can you provide a numerial exaple to test?. TYVM, Pedro

Hello,

Here is a numerical example:
cex=0 (Outer Circle centered at (0,0))
cey=0
c=0.2 (Fraction of Outer circle radius left for the triangle)
a=(sqrt(3)*(c-1)+sqrt((c+1)*(3-c)))/2=0.223694816
d=a*r=1.11847408 (Side length of equilateral triangle)
t=40° (0.6981317008 rad) (Angle at B)
Ax=cex+r*(1-c)*cos(t)=3.064177772
Ay=cey+r*(1-c)*sin(t)=2.571150439
Cx=Ax+d*sin(PI/3-t)=3.446718437
Cy=Ay+d*cos(PI/3-t)=3.622172279
Dx=Ax+d*cos(t-PI/6)=4.165659718
Dy=Ay+d*sin(t-PI/6))=2.765371425
Bx=cex+r*cos(t)=3.830222216
By=cey+r*sin(t)=3.213938048
Ex=cex+(r*(1-c)+d*cos(PI/6))*cos(t)=3.806189078
Ey=cey+(r*(1-c)+d*cos(PI/6))*sin(t)=3.193771851

Distance OA=sqrt((Ax-cex)^2+(Ay-cey)^2)=4
OK Distance OA=4=r*(1-c)
Distance AE=sqrt((Ax-Ex)^2+(Ay-Ey)^2)=0.9686269669
Distance EB=sqrt((Ex-Bx)^2+(Ey-By)^2)=0.03137303338
OK Distance AB=Distance AE+Distance EB=1=r*c
Distance AC=sqrt((Ax-Cx)^2+(Ay-Cy)^2)=1.11847408
Distance CD=sqrt((Cx-Dx)^2+(Cy-Dy)^2)=1.11847408
Distance DA=sqrt((Dx-Ax)^2+(Dy-Ay)^2)=1.11847408
OK Distance AC=Distance CD=Distance DA=d => Equilateral

CQFD
06-07-2017, 04:25 PM
Post: #6
 Jim Horn Member Posts: 200 Joined: Dec 2013
RE: Small challenge
Or, a=(sqrt(7)-2)*sqrt(3)/5
06-07-2017, 04:31 PM
Post: #7
 Pekis Member Posts: 120 Joined: Aug 2014
RE: Small challenge
(06-07-2017 04:25 PM)Jim Horn Wrote:  Or, a=(sqrt(7)-2)*sqrt(3)/5

Yes, for c=0.2
Thanks
06-07-2017, 08:42 PM (This post was last modified: 06-08-2017 02:24 AM by SlideRule.)
Post: #8
 SlideRule Senior Member Posts: 1,313 Joined: Dec 2013
RE: Small challenge
I arrived at a slightly different results:
Δ ≈ 6.52° = interior angle formed by the line segments BOD
(½ the central angle of the sector formed by COD)
θ ≈ 23.58° = interior angle formed by line segments ADO
D ≈ (0.118474, 0.993725)
D ≈ (0.111847, 0.993725) typo correction
verified by WolframAlpha & AnalyzeMath
AD ≈ 0.22710 = d = a*R
AD ≈ 0.22369 = d = a*R correction for typo

[attachment=4914]

[attachment=4915]

The difference seems to be associated with the assumption guiding the calculation of the distance EB. I do not see how the Arc Segment S for the sector CAD with a central angle anchored to point A and the Arc Segment for the sector COD with a central angle anchored at point O can both describe the same arc segment CBD.
Although the difference of the sagitta calculated this way may be small, in a manner similar to the small difference between the SIN & the TAN of a small angle, I take exception to the equality of the results, not the equivalency.
Where am I going wrong?

BEST!
SlideRule
06-07-2017, 09:54 PM
Post: #9
 Pekis Member Posts: 120 Joined: Aug 2014
RE: Small challenge
(06-07-2017 08:42 PM)SlideRule Wrote:  I arrived at a slightly different results:
Δ ≈ 6.52° = interior angle formed by the line segments BOD
(½ the central angle of the sector formed by COD)
θ ≈ 23.58° = interior angle formed by line segments ADO
D ≈ (0.118474, 0.993725)
verified by WolframAlpha & AnalyzeMath
AD ≈ 0.22710 = d = a*R

The difference seems to be associated with the assumption guiding the calculation of the distance EB. I do not see how the Arc Segment S for the sector CAD with a central angle anchored to point A and the Arc Segment for the sector COD with a central angle anchored at point O can both describe the same arc segment CBD.
Although the difference of the sagitta calculated this way may be small, in a manner similar to the small difference between the SIN & the TAN of a small angle, I take exception to the equality of the results, not the equivalency.
Where am I going wrong?

BEST!
SlideRule

Hello,
Don't forget that the points C and D belong to the outer circle with radius r. So, although they also belong to the triangle ACD, the formula I used to calculate the arc height seems perfectly valid. You could imagine a OCD triangle to apply the formula. What do you think ? Thanks
06-07-2017, 10:53 PM (This post was last modified: 06-08-2017 02:26 AM by SlideRule.)
Post: #10
 SlideRule Senior Member Posts: 1,313 Joined: Dec 2013
RE: Small challenge
Pekis

I used the Line-Circle intersect equations to calculate the coordinates of point D & since the other points can all be derived by rotating the line segment thru points O & B to align with the y axis, the rest is simple trigonometry / geometry using the distance formula, etc.

I've attached a grahpmatica screen capture to illustrate the deviation in the two Arcs thru pts C-D created by the two segments C-A-D (with central angle @ A) & C-O-D (with central angle @ O). The approximate delta is 0.0235.

[attachment=4916]

BEST!
SlideRule

edit: found and corrected numeric typo - omitted a digit!
06-08-2017, 05:10 AM (This post was last modified: 06-08-2017 05:12 AM by Pekis.)
Post: #11
 Pekis Member Posts: 120 Joined: Aug 2014
RE: Small challenge
(06-07-2017 10:53 PM)SlideRule Wrote:  Pekis

I used the Line-Circle intersect equations to calculate the coordinates of point D & since the other points can all be derived by rotating the line segment thru points O & B to align with the y axis, the rest is simple trigonometry / geometry using the distance formula, etc.

I've attached a grahpmatica screen capture to illustrate the deviation in the two Arcs thru pts C-D created by the two segments C-A-D (with central angle @ A) & C-O-D (with central angle @ O). The approximate delta is 0.0235.

BEST!
SlideRule

edit: found and corrected numeric typo - omitted a digit!

But there is no arc with central angle at A ! The only existing arc is created by outer circle with radius r and points C and D, with central angle at O, and for which I used the arc height formula.
Another completely different thing is the equilateral triangle ACD ... But I understand it can be confusing
06-08-2017, 12:12 PM (This post was last modified: 06-08-2017 12:13 PM by SlideRule.)
Post: #12
 SlideRule Senior Member Posts: 1,313 Joined: Dec 2013
RE: Small challenge
Pekis

Talk about one mistake leading to another - I shouldn't do these challenges after midnight. I was looking for the reason underlying the difference in the magnitude of my solution and made a hasty & incorrect assumption with respect to the calculation of the sagitta, very embarrassing senior moment!

I wonder, is there a third approach to the solution of the problem?

BEST!
SlideRule
06-08-2017, 12:59 PM
Post: #13
 PedroLeiva Member Posts: 188 Joined: Jun 2014
RE: Small challenge
(06-07-2017 03:49 PM)Pekis Wrote:
(06-07-2017 11:35 AM)PedroLeiva Wrote:  Can you provide a numerial exaple to test?. TYVM, Pedro

Hello,

Here is a numerical example:
OK Distance AC=Distance CD=Distance DA=d => Equilateral
.........................................................
CQFD
Thank´s , Pedro
06-09-2017, 07:08 AM
Post: #14
 Pekis Member Posts: 120 Joined: Aug 2014
RE: Small challenge
Hello,

I also tried to complete the drawing of the equilateral triangle with the surface below the arc (transforming the equilateral triangle into a pie slice).

It's then good to know that:
Arc length=r*2*arcsin(a/2)
Arc height=r*(1-sqrt(4-a^2)/2)

Arc angle span=Arc lengh/r=2*arcsin(a/2)
Arc starting angle (at C)=t+arcsin(a/2)
Arc ending angle (at D)=t-arcsin(a/2)

Thanks to all !
06-09-2017, 01:14 PM (This post was last modified: 06-09-2017 01:35 PM by Vtile.)
Post: #15
 Vtile Senior Member Posts: 404 Joined: Oct 2015
RE: Small challenge
(06-08-2017 12:12 PM)SlideRule Wrote:  Pekis

Talk about one mistake leading to another - I shouldn't do these challenges after midnight. I was looking for the reason underlying the difference in the magnitude of my solution and made a hasty & incorrect assumption with respect to the calculation of the sagitta, very embarrassing senior moment!

I wonder, is there a third approach to the solution of the problem?

BEST!
SlideRule
At least it is nice to know that I'm not the only one writing gibberish at times while surfing at the midnight on MoHPC!

I'll throw in another small and easy challenge ( especially since I give a picture. ). You are making cones out of cardboard, what are the measures of the cut out piece when it is then bend to cone and the dimensions for the cone are as follows.

angle Alpha: 30 deg.
R: 30
Hx: 5

The given values are random.
06-11-2017, 10:59 AM
Post: #16
 Csaba Tizedes Senior Member Posts: 495 Joined: May 2014
RE: Small challenge
(06-09-2017 01:14 PM)Vtile Wrote:  I'll throw in another small and easy challenge ( especially since I give a picture. ). You are making cones out of cardboard, what are the measures of the cut out piece when it is then bend to cone and the dimensions for the cone are as follows.

angle Alpha: 30 deg.
R: 30
Hx: 5

From these equations ($$\beta$$ in radian):
$$R_2 · \beta=2 · r · \pi$$, and

$$(R_2+s) · \beta=2 · R · \pi$$

we get:
$$R_2=\frac{\frac{h_x}{cos \alpha}}{\frac{R}{R-h_x}-1}$$, and

$$\beta=\frac{2 · (R-h_x) · \pi}{R_2}$$

Csaba
06-11-2017, 09:58 PM (This post was last modified: 06-12-2017 08:12 AM by Pekis.)
Post: #17
 Pekis Member Posts: 120 Joined: Aug 2014
RE: Small challenge
Hello,

I just don't fully understand the figure in your cone challenge ...

Anyway, I wanted to give an epilogue to my challenge with a generalized formula with a isosceles triangle (with one base and two equal sides) instead of an equilateral one:

let c=Fraction of Outer circle radius left for the isosceles triangle
let p=1-c=Fraction of Outer circle radius for the figure inside the inner circle
let b=Base length of the isosceles triangle
let e=Fraction of the outer circle radius for base length => b=e*r
let d=Side length of the isosceles triangle
let a=Fraction of the outer circle radius for side length => d=a*r
let k=a/e=Ratio between Side and Base of the isosceles triangle

=> a=(sqrt(4*k²-p²)-p*sqrt(4*k²-1))/(2*k)
It's good looking ...

Arc length: r*2*arcsin(a/(2*k))
Arc height: r*sqrt(4-(a/k)²)/2
Arc Angle span: 2*arcsin(a/(2*k))
Arc Start angle: t+arcsin(a/(2*k))
Arc End angle: t-arcsin(a/(2*k))
And instead of the PI/6 angle in ACE, we now have Angle ACE=arcsin(1/(2*k))

For an equilateral triangle, k=1 and it leads to
a=((sqrt(4-p²)-p*sqrt(3))/2
(same as previous formula a=(sqrt(3)*(c-1)+sqrt((c+1)*(3-c)))/2))

Thanks
 « Next Oldest | Next Newest »

User(s) browsing this thread: 1 Guest(s)