(mathematics )

(mathematics )

Anonymous
Not applicable
358 Views
11 Replies
Message 1 of 12

(mathematics )

Anonymous
Not applicable
How can i calcula.. the angle of two point
for example point a in the delta x -5.00 or 5.00
pointb in the delta y 2.00 or -2.00
0 Likes
359 Views
11 Replies
Replies (11)
Message 2 of 12

Anonymous
Not applicable
if you normalize your deltaX,Y,Z to a direction vector with a length of
1 you can use get the ArcSin of Dx, Dy, and Dz which wil give you the
angles. Is this what your looking for?

Public Function Asin(ByVal a As Double) As Double
'\\\\\\function to take in an angle in radians and return the angle
'\\\\\\in radians
'a = 1
If (Round(a, 8) <> 1) And (Round(a, 8) <> -1) Then
Asin = Atn(a / Sqr(-a * a + 1))
Else
Asin = dtr(a * 90#)
End If
End Function

Public Function dtr(ByVal a As Double) As Double
'\\\\\\function to convert degrees to radians
dtr = pi * (a / 180#)
End Function

Public Function rtd(ByVal a As Double) As Double
'\\\\\\function to convert radians to degrees
rtd = (a * 180#) / pi
End Function

--

LHGO wrote:

> How can i calcula.. the angle of two point
> for example point a in the delta x -5.00 or 5.00
> pointb in the delta y 2.00 or -2.00
0 Likes
Message 3 of 12

Anonymous
Not applicable
LHGO had this to say:

> How can i calcula.. the angle of two point
> for example point a in the delta x -5.00 or 5.00
> pointb in the delta y 2.00 or -2.00

Check out the AngleFromXAxis method of the AcadUtility class.

--
"If you want to be somebody else change your mind"
http://www.acadx.com
http://vbxtender.sourceforge.net
0 Likes
Message 4 of 12

Anonymous
Not applicable
But how to do whit tan x in vban tanx = -5/5

"Frank Oquendo" wrote in message
news:E8C024D398F1A3531CEAEBE412CC294F@in.WebX.maYIadrTaRb...
> LHGO had this to say:
>
> > How can i calcula.. the angle of two point
> > for example point a in the delta x -5.00 or 5.00
> > pointb in the delta y 2.00 or -2.00
>
> Check out the AngleFromXAxis method of the AcadUtility class.
>
> --
> "If you want to be somebody else change your mind"
> http://www.acadx.com
> http://vbxtender.sourceforge.net
>
>
0 Likes
Message 5 of 12

Anonymous
Not applicable
LHGO had this to say:

> But how to do whit tan x in vban tanx = -5/5

Perhaps I do not understand the question. What do tangents have to do with
the angle between two points?

--
"If you want to be somebody else change your mind"
http://www.acadx.com
http://vbxtender.sourceforge.net
0 Likes
Message 6 of 12

Anonymous
Not applicable
when you now your angle tan

Public Function Cnv2Rad(DegreesIn As Double) As Double
'Convert degress to radians
Cnv2Rad = ((4 * Atn(1)) * (DegreesIn / 180#))
End Function


tan-1 or tan x ??
"Frank Oquendo" wrote in message
news:B2B9D402E68AADD4974D67472E14233E@in.WebX.maYIadrTaRb...
> LHGO had this to say:
>
> > But how to do whit tan x in vban tanx = -5/5
>
> Perhaps I do not understand the question. What do tangents have to do with
> the angle between two points?
>
> --
> "If you want to be somebody else change your mind"
> http://www.acadx.com
> http://vbxtender.sourceforge.net
>
>
0 Likes
Message 7 of 12

Anonymous
Not applicable
LHGO had this to say:

> when you now your angle tan
>
> Public Function Cnv2Rad(DegreesIn As Double) As Double
> 'Convert degress to radians
> Cnv2Rad = ((4 * Atn(1)) * (DegreesIn / 180#))
> End Function
>
>
> tan-1 or tan x ??

Color me confused. Are you trying to get the angle between a pair of points
or the tangent of the angle between a pair of points? If the former,
AngleFromXAxis has you covered. If the latter, I know squat about geometry
but I'm sure a Google search will give you all the information you need to
solve your puzzle.

--
"If you want to be somebody else change your mind"
http://www.acadx.com
http://vbxtender.sourceforge.net
0 Likes
Message 8 of 12

Anonymous
Not applicable
Perhaps this will help. If not send me an email
joesu@worldnet.att.net

Joe
--
Public Sub GetPointsAngle()
MsgBox ThisDrawing.Utility.AngleToString _
(ThisDrawing.Utility.GetAngle _
(ThisDrawing.Utility.GetPoint _
(Prompt:="Select first point"), "Select second point"), acDegrees, 4)
End Sub
0 Likes
Message 9 of 12

Anonymous
Not applicable
This only what i whant  3 / 5 = 0.6


size=2>                                
0.6 tan-1 =30.96375653°


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Perhaps
this will help. If not send me an email
joesu@worldnet.att.net

Joe
--
Public Sub GetPointsAngle()
  MsgBox
ThisDrawing.Utility.AngleToString _

    (ThisDrawing.Utility.GetAngle _

    (ThisDrawing.Utility.GetPoint _

    (Prompt:="Select first point"), "Select second
point"), acDegrees, 4)
End Sub

0 Likes
Message 10 of 12

Anonymous
Not applicable
I think your looking for the Atan(num) function which takes args and
returns in radians then you need to convert to degrees.

I hope this helps

--

LHGO wrote:

> This only what i whant 3 / 5 = 0.6
> 0.6 tan-1 =30.96375653°
>
> "joesu" wrote in message
> news:f1006d4.5@WebX.maYIadrTaRb...Perhaps this will help. If
> not send me an email
> joesu@worldnet.att.net
>
> Joe
> --
> Public Sub GetPointsAngle()
> MsgBox ThisDrawing.Utility.AngleToString _
> (ThisDrawing.Utility.GetAngle _
> (ThisDrawing.Utility.GetPoint _
> (Prompt:="Select first point"), "Select second point"),
> acDegrees, 4)
> End Sub
>
0 Likes
Message 11 of 12

Anonymous
Not applicable
I believe that this is what you are trying to acheive.

Joe
--
Public Sub AngleDeltaOfTwoPoints()
Dim Pt1 As Variant
Dim Pt2 As Variant
Dim Line As AcadLine

With ThisDrawing
Pt1 = .Utility.GetPoint(Prompt:="Selection first point")
Pt2 = .Utility.GetPoint(Prompt:="Selection second point")

If .ActiveSpace Then
Set Line = .ModelSpace.AddLine(Pt1, Pt2)
MsgBox "Angle = " & .Utility.AngleToString(Line.Angle, acDegrees, 4) & ", Delta = " & Line.Length

Else
Set Line = .PaperSpace.AddLine(Pt1, Pt2)
MsgBox "Angle = " & .Utility.AngleToString(Line.Angle, acDegrees, 4) & ", Delta = " & Line.Length
End If
End With
Line.Delete
End Sub
0 Likes
Message 12 of 12

Anonymous
Not applicable
Post your questions
size=2> in spanish

 

-gnb


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">

This only what i whant  3 / 5 = 0.6


size=2>                                
0.6 tan-1 =30.96375653°


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Perhaps
this will help. If not send me an email
joesu@worldnet.att.net

Joe
--
Public Sub GetPointsAngle()
  MsgBox
ThisDrawing.Utility.AngleToString _

    (ThisDrawing.Utility.GetAngle _

    (ThisDrawing.Utility.GetPoint _

    (Prompt:="Select first point"), "Select second
point"), acDegrees, 4)
End Sub

0 Likes