|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
The following problem:
From a triangle from whom i know the length of both legs (A and B) i want to
calculate the longest leg (C).
As i remember from school its C*C=A*A+B*B where A=62.5 and B=17.
Translated into PovRay its C=sqrt(pow(A,2)+pow(B,2)) but the result is much
smaller. The correct result for C should be +/-32.596
Code:
#local RH=149; // Rail Height
#local FW=125; // Flange Width
#local HT=65.4; // Head Width at Top
#local HB=70; // Head Width at Base
#local HH=39.8; // Head Height
#local WT=14; // Web Thickness
#local FE=10.5; // Flange Thickness at Edge
#local FM=27.5; // Flange Thickness at Center
#local Y_X=76; // Gravity Center
#local FMT=degrees(atan((FM-FE)/(FW/2)));
//c = sqrt( pow( a , 2) + pow( b , 2 ) ) .
#local FE_FM=sqrt(pow((FM-FE),2)+pow(FE/2,2));
box{<0,FM,0><FE_FM,0,1> Rotate_Around_Trans(<0,0,-FMT><0,FM,0>) pigment {Red}}
End Code
But maybe there is a error in the box code becourse is i replace FE_FM with that
value is displayed wrong also.
Regards
Harry
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
14.03.2010 18:39, gharryh пишет:
> The following problem:
>
> From a triangle from whom i know the length of both legs (A and B) i want to
> calculate the longest leg (C).
> As i remember from school its C*C=A*A+B*B where A=62.5 and B=17.
> Translated into PovRay its C=sqrt(pow(A,2)+pow(B,2)) but the result is much
> smaller. The correct result for C should be +/-32.596
it works only if angle between A and B is equal 90 degrees, in other
case use e.g. theorem of sinus
A/sin(alpha) = B/sin(beta) = C/sin(gamma)
>
> Code:
> #local RH=149; // Rail Height
> #local FW=125; // Flange Width
> #local HT=65.4; // Head Width at Top
> #local HB=70; // Head Width at Base
> #local HH=39.8; // Head Height
> #local WT=14; // Web Thickness
> #local FE=10.5; // Flange Thickness at Edge
> #local FM=27.5; // Flange Thickness at Center
> #local Y_X=76; // Gravity Center
> #local FMT=degrees(atan((FM-FE)/(FW/2)));
> //c = sqrt( pow( a , 2) + pow( b , 2 ) ) .
> #local FE_FM=sqrt(pow((FM-FE),2)+pow(FE/2,2));
>
> box{<0,FM,0><FE_FM,0,1> Rotate_Around_Trans(<0,0,-FMT><0,FM,0>) pigment {Red}}
>
> End Code
>
> But maybe there is a error in the box code becourse is i replace FE_FM with that
> value is displayed wrong also.
>
> Regards
>
> Harry
>
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
14.03.2010 20:57, slair пишет:
> 14.03.2010 18:39, gharryh пишет:
>> The following problem:
>>
>> From a triangle from whom i know the length of both legs (A and B) i
>> want to
>> calculate the longest leg (C).
>> As i remember from school its C*C=A*A+B*B where A=62.5 and B=17.
>> Translated into PovRay its C=sqrt(pow(A,2)+pow(B,2)) but the result is
>> much
>> smaller. The correct result for C should be +/-32.596
>
> it works only if angle between A and B is equal 90 degrees, in other
> case use e.g. theorem of sinus
>
> A/sin(alpha) = B/sin(beta) = C/sin(gamma)
http://en.wikipedia.org/wiki/Law_of_sines
>>
>> Code:
>> #local RH=149; // Rail Height
>> #local FW=125; // Flange Width
>> #local HT=65.4; // Head Width at Top
>> #local HB=70; // Head Width at Base
>> #local HH=39.8; // Head Height
>> #local WT=14; // Web Thickness
>> #local FE=10.5; // Flange Thickness at Edge
>> #local FM=27.5; // Flange Thickness at Center
>> #local Y_X=76; // Gravity Center
>> #local FMT=degrees(atan((FM-FE)/(FW/2)));
>> //c = sqrt( pow( a , 2) + pow( b , 2 ) ) .
>> #local FE_FM=sqrt(pow((FM-FE),2)+pow(FE/2,2));
>>
>> box{<0,FM,0><FE_FM,0,1> Rotate_Around_Trans(<0,0,-FMT><0,FM,0>)
>> pigment {Red}}
>>
>> End Code
>>
>> But maybe there is a error in the box code becourse is i replace FE_FM
>> with that
>> value is displayed wrong also.
>>
>> Regards
>>
>> Harry
>>
>>
>>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
gharryh wrote:
> From a triangle from whom i know the length of both legs (A and B) i want to
> calculate the longest leg (C).
> As i remember from school its C*C=A*A+B*B where A=62.5 and B=17.
> Translated into PovRay its C=sqrt(pow(A,2)+pow(B,2)) but the result is much
> smaller. The correct result for C should be +/-32.596
I don't know where you get your C=32.596 from but this is impossible, in
this case A would be bigger than B+C, which means that no triangle will
have sides of these lengths, no matter what the angles are...
--
Vincent
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Le 2010-03-16 08:15, Vincent Le Chevalier a écrit :
> gharryh wrote:
>> From a triangle from whom i know the length of both legs (A and B) i
>> want to
>> calculate the longest leg (C).
>> As i remember from school its C*C=A*A+B*B where A=62.5 and B=17.
>> Translated into PovRay its C=sqrt(pow(A,2)+pow(B,2)) but the result is
>> much
>> smaller. The correct result for C should be +/-32.596
>
> I don't know where you get your C=32.596 from but this is impossible, in
> this case A would be bigger than B+C, which means that no triangle will
> have sides of these lengths, no matter what the angles are...
>
It can be possible, but definetly not in plane geometry.
If you trace your triangle on a curved surface, and the triangle is
large relative to the curvature of said surface, the sum of the angles
can get larger than 360 degrees, close to 539.999 degrees can become
possible, and the relative length of the sides amount to any relations.
Trace a very large triangle around the Earth, 2 sumits on the equator
and the third one 1mm away from it, located at longitudes 0, 120 and
-120, and mesure the angles on the ground.
Alain
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Alain wrote:
> It can be possible, but definetly not in plane geometry.
Well it's not possible either in spherical geometry, and I doubt you'll
find a "reasonable" space that does not respect triangle inequality...
Remember, my argument was not about the angles but about the distances.
What I'm saying is that if you're looking for a triangle where the
length of one side is longer than the sum of the lengths of the other
two sides, you have bigger problems than the square root to worry about...
--
Vincent
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Vincent Le Chevalier wrote:
> Alain wrote:
>> It can be possible, but definetly not in plane geometry.
>
> Well it's not possible either in spherical geometry, and I doubt you'll
> find a "reasonable" space that does not respect triangle inequality...
>
> Remember, my argument was not about the angles but about the distances.
> What I'm saying is that if you're looking for a triangle where the
> length of one side is longer than the sum of the lengths of the other
> two sides, you have bigger problems than the square root to worry about
...
>
Actually, it is possible in spherical geometry. You just have to
remember that two points are not sufficient to define an edge on a
sphere: there are two possibilities, one of which goes around the
sphere...
Jerome
--
mailto:jeb### [at] freefr
http://jeberger.free.fr
Jabber: jeb### [at] jabberfr
Post a reply to this message
Attachments:
Download 'us-ascii' (1 KB)
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Jérôme M. Berger wrote:
> Actually, it is possible in spherical geometry. You just have to
> remember that two points are not sufficient to define an edge on a
> sphere: there are two possibilities, one of which goes around the
> sphere...
>
Ah yes, I was thinking of the triangles specified by joining the points
according to the great-circle distance, i.e. the shortest arc between
the vertices.
Problem is that if you allow to build triangles using the other arcs
(the ones that go all the way around), you end up also allowing
triangles that have intersecting sides, which is interesting, I guess,
but then calling them triangles is perhaps slightly abusive :-)
--
Vincent
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Vincent Le Chevalier <gal### [at] libertyALLsurfSPAMfr> wrote:
> Jérôme M. Berger wrote:
> > Actually, it is possible in spherical geometry. You just have to
> > remember that two points are not sufficient to define an edge on a
> > sphere: there are two possibilities, one of which goes around the
> > sphere...
> >
>
> Ah yes, I was thinking of the triangles specified by joining the points
> according to the great-circle distance, i.e. the shortest arc between
> the vertices.
> Vincent
Problem is solved using this:
#macro flange() // Create the bottom flange
difference {
union {
box{<0,FM,0><FE_FM,0,1> Rotate_Around_Trans(<0,0,-FMT><0,FM,0>)}
box{<0,FM,0><-65,0,1> Rotate_Around_Trans(<0,0,FMT><0,FM,0>)}
box{<-FW/2,0,0><FW/2,FE,1>}
}
box{<-FW/2,0,-0.1><FW/2,-FE*1.75,1.1>}
}
#end
Harry
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|