Die Mathe

Win-Tuning-Portal.de
Verfügbare Informationen zu "Die Mathe"

  • Qualität des Beitrags: 0 Sterne
  • Beteiligte Poster: rub
  • Forum: Win-Tuning-Portal.de
  • Forenbeschreibung: zusammen unschlagbar !
  • aus dem Unterforum: 3D Engine
  • Antworten: 1
  • Forum gestartet am: Dienstag 15.08.2006
  • Sprache: deutsch
  • Link zum Originaltopic: Die Mathe
  • Letzte Antwort: vor 16 Jahren, 5 Monaten, 20 Tagen, 16 Stunden, 32 Minuten
  • Alle Beiträge und Antworten zu "Die Mathe"

    Re: Die Mathe

    rub - 07.10.2006, 10:29

    Die Mathe
    Hi,

    ich stelle mal meine Mathefunktionen und Klassen ein. Sind zwar in Dot.Net, aber ist bestimmt auch nicht schwierig, das in VB um zu setzen.

    PS: Ich übernehme keine Garantie :wink:

    PSS: Alle Klassen, bis auf die Letzte werden lediglich für Rückgabe, bzw. Übergabewerte benötigt.

    Code:

    '--------------------------------------------------------------------

    Public Class cls_Ebene
        'Ebene : PunktRichtungsFormel  => VektorOX = VektorOA + r*VektorU + t*VektorV

        Private iVektorOA As New cls_Point3D
        Private iVektorU As New cls_Point3D
        Private iVektorV As New cls_Point3D

        Public Sub New()
            VektorOA = New cls_Point3D(0, 0, 0)
            VektorU = New cls_Point3D(0, 0, 1)
            VektorV = New cls_Point3D(1, 0, 0)
        End Sub

        Public Sub New(ByVal curVektorOA As cls_Point3D, ByVal curVektorU As cls_Point3D, ByVal curVektorV As cls_Point3D)
            VektorOA = curVektorOA
            VektorU = curVektorU
            VektorV = curVektorV
        End Sub

        Public Property VektorOA() As cls_Point3D
            Get
                Return iVektorOA
            End Get
            Set(ByVal value As cls_Point3D)
                iVektorOA = value
            End Set
        End Property

        Public Property VektorU() As cls_Point3D
            Get
                Return iVektorU
            End Get
            Set(ByVal value As cls_Point3D)
                iVektorU = value
            End Set
        End Property

        Public Property VektorV() As cls_Point3D
            Get
                Return iVektorV
            End Get
            Set(ByVal value As cls_Point3D)
                iVektorV = value
            End Set
        End Property

    End Class

    '--------------------------------------------------------------------

    Public Class cls_Point2D

        Private ix As Double = 0
        Private iy As Double = 0

        Public Sub New(ByVal x As Double, ByVal y As Double)
            ix = x
            iy = y
        End Sub

        Public Property x() As Double
            Get
                Return ix
            End Get
            Set(ByVal value As Double)
                ix = value
            End Set
        End Property

        Public Property y() As Double
            Get
                Return iy
            End Get
            Set(ByVal value As Double)
                iy = value
            End Set
        End Property

    End Class

    '--------------------------------------------------------------------

    Public Class cls_Point3D

        Private ix As Double = 0
        Private iy As Double = 0
        Private iz As Double = 0

        Public Sub New()
            ix = 0
            iy = 0
            iz = 0
        End Sub

        Public Sub New(ByVal x As Double)
            ix = x
            iy = 0
            iz = 0
        End Sub

        Public Sub New(ByVal x As Double, ByVal y As Double)
            ix = x
            iy = y
            iz = 0
        End Sub

        Public Sub New(ByVal x As Double, ByVal y As Double, ByVal z As Double)
            ix = x
            iy = y
            iz = z
        End Sub

        Public Property x() As Double
            Get
                Return ix
            End Get
            Set(ByVal value As Double)
                ix = value
            End Set
        End Property

        Public Property y() As Double
            Get
                Return iy
            End Get
            Set(ByVal value As Double)
                iy = value
            End Set
        End Property

        Public Property z() As Double
            Get
                Return iz
            End Get
            Set(ByVal value As Double)
                iz = value
            End Set
        End Property

    End Class

    '--------------------------------------------------------------------

    Public Class cls_Schneideresultat2D

        Private ix As Double = 0
        Private iy As Double = 0
        Private iStatus As Int16

        Public Enum enumSchneideStatus
            ErrorTrue = 1
            Schneidet = 2
            Parallel = 3
        End Enum

        Public Sub New(ByVal x As Double, ByVal y As Double)
            ix = x
            iy = y
        End Sub

        Public Property x() As Double
            Get
                Return ix
            End Get
            Set(ByVal value As Double)
                ix = value
            End Set
        End Property

        Public Property y() As Double
            Get
                Return iy
            End Get
            Set(ByVal value As Double)
                iy = value
            End Set
        End Property

        Public Property Status() As enumSchneideStatus
            Get
                Return iStatus
            End Get
            Set(ByVal value As enumSchneideStatus)
                iStatus = value
            End Set
        End Property

    End Class

    '--------------------------------------------------------------------

    Public Class cls_Schneideresultat3D

        Private ix As Double = 0
        Private iy As Double = 0
        Private iz As Double = 0
        Private iStatus As enumSchneideStatus

        Public Enum enumSchneideStatus
            ErrorTrue = 1
            Schneidet = 2
            Parallel = 3
            'Senkrecht = 4
        End Enum

        Public Sub New(ByVal x As Double, ByVal y As Double, ByVal z As Double)
            ix = x
            iy = y
            iz = z
            iStatus = enumSchneideStatus.ErrorTrue
        End Sub

        Public Sub New()
            ix = 0
            iy = 0
            iz = 0
            iStatus = enumSchneideStatus.ErrorTrue
        End Sub

        Public Property x() As Double
            Get
                Return ix
            End Get
            Set(ByVal value As Double)
                ix = value
            End Set
        End Property

        Public Property y() As Double
            Get
                Return iy
            End Get
            Set(ByVal value As Double)
                iy = value
            End Set
        End Property

        Public Property z() As Double
            Get
                Return iz
            End Get
            Set(ByVal value As Double)
                iz = value
            End Set
        End Property

        Public Property Status() As enumSchneideStatus
            Get
                Return iStatus
            End Get
            Set(ByVal value As enumSchneideStatus)
                iStatus = value
            End Set
        End Property

    End Class

    '--------------------------------------------------------------------

    Imports Microsoft

    Public Class co_Math

        'http://www.matheboard.de/thread.php?threadid=580

        Public Enum enumVektorenGeradenschnitt
            nichtParallel = 1
            ParallelGleicheOrientierung = 2
            ParallelUngleicheOrientierung = 3
        End Enum

        ''' <summary>
        ''' Geben Sie hier jeweils zwei Punkte einer jeden Geraden an.
        ''' </summary>
        Public Function Vektoren2DSteigungEinerGeradenErmitteln2D(ByVal p1 As cls_Point2D, ByVal p2 As cls_Point2D) As Double
            Try
                'Dim g As String = "y=x*m + t"
                Dim m1 As Double = 0
                m1 = (p2.y - p1.y) / (p2.x - p1.x)
                Return m1
            Catch ex As Exception
                'Hier noch anderen Übergabetyp einstellen, da bei (p2.x - p1.x) = 0,
                'die Punkte übereinander liegen, also funendliche Steigung, also x = Statisch.
                Return 0
            End Try
        End Function

        ''' <summary>
        ''' Überladung: Geben Sie hier jeweils zwei Punkte einer jeden Geraden an.
        ''' </summary>
        Public Function Vektoren2DSchneideGeraden(ByVal p1g1 As cls_Point2D, ByVal p2g1 As cls_Point2D, ByVal p1g2 As cls_Point2D, ByVal p2g2 As cls_Point2D) As cls_Schneideresultat2D
            Try

                ' g1 = "y1=x1*m1 + t1"
                ' g2 = "y2=x2*m2 + t2"

                Dim SRes As New cls_Schneideresultat2D(0, 0)
                Dim m1 As Double = 0
                Dim m2 As Double = 0
                Dim t1 As Double = 0
                Dim t2 As Double = 0
                SRes.Status = cls_Schneideresultat2D.enumSchneideStatus.ErrorTrue
                m1 = (p2g1.y - p1g1.y) / (p2g1.x - p1g1.x)
                m2 = (p2g2.y - p1g2.y) / (p2g2.x - p1g2.x)

                'Zwischenschritte
                'p1g1.Y = (p1g1.X * m1) + t1  ;-t1
                'p1g1.Y -t1= (p1g1.X * m1)    ;-p1g1.Y
                '-t1= (p1g1.X * m1) - p1g1.Y  ;-p1g1.Y  ; *-1

                t1 = ((p1g1.x * m1) - p1g1.y) * -1
                t2 = ((p1g2.x * m2) - p1g2.y) * -1

                'Zwischenschritte
                '(x * m1)+t1 = (x * m2)+t2                 ; -t2
                '(x * m1)+t1 -t2 = (x * m2)                ; - (x * m1)
                '+t1 -t2= (x * m2) - (x * m1)              ; vereinfachen
                '+t1 -t2= (m2 - m1) * x                    ; * (m2 - m1)
                '(+t1 -t2) * (m2 - m1)= (m2 - m1) * x      ; *Kehrwert
                ' X = (+t1 - t2) * (1 / (m2 - m1))       

                'Wenn m2-m1 = 0, dann sind die Geraden parallel.
                If (m2 - m1) = 0 Then
                    SRes.Status = cls_Schneideresultat2D.enumSchneideStatus.Parallel
                Else
                    SRes.x = (+t1 - t2) * (1 / (m2 - m1))
                    SRes.y = m1 * SRes.x + t1
                    SRes.Status = cls_Schneideresultat2D.enumSchneideStatus.Schneidet
                End If
                Return SRes
            Catch ex As Exception
                Dim SRes1 As New cls_Schneideresultat2D(0, 0)
                SRes1.Status = cls_Schneideresultat2D.enumSchneideStatus.ErrorTrue
                Return SRes1
            End Try
        End Function

        ''' <summary>
        ''' Überladung: Geben Sie hier die Strigungen m1 und m2 sowie den Versatz t1 und t2 an.
        ''' </summary>
        Public Function Vektoren2DSchneideGeraden(ByVal m1 As Double, ByVal m2 As Double, ByVal t1 As Double, ByVal t2 As Double) As cls_Schneideresultat2D
            Try

                'Dim g1 As String = "y1=x1*m1 + t1"
                'Dim g2 As String = "y2=x2*m2 + t2"

                Dim SRes As New cls_Schneideresultat2D(0, 0)

                'Zwischenschritte
                '(x * m1)+t1 = (x * m2)+t2                 ; -t2
                '(x * m1)+t1 -t2 = (x * m2)                ; - (x * m1)
                '+t1 -t2= (x * m2) - (x * m1)              ; vereinfachen
                '+t1 -t2= (m2 - m1) * x                    ; * (m2 - m1)
                '(+t1 -t2) * (m2 - m1)= (m2 - m1) * x      ; *Kehrwert
                ' X = (+t1 - t2) * (1 / (m2 - m1))       

                'Wenn m2-m1 = 0, dann sind die Geraden parallel.
                If (m2 - m1) = 0 Then
                    SRes.Status = cls_Schneideresultat2D.enumSchneideStatus.Parallel
                Else
                    SRes.Status = cls_Schneideresultat2D.enumSchneideStatus.Schneidet
                    SRes.x = (+t1 - t2) * (1 / (m2 - m1))
                    SRes.y = m1 * SRes.x + t1
                End If
                Return SRes
            Catch ex As Exception
                Dim SRes1 As New cls_Schneideresultat2D(0, 0)
                SRes1.Status = cls_Schneideresultat2D.enumSchneideStatus.ErrorTrue
                Return SRes1
            End Try
        End Function

        ''' <summary>
        ''' Diese Funktion prüft, ob zwei Geraden, Prallel und gleich orientiert sind.
        ''' </summary>
        Public Function Vektoren3DParallelitaet3D(ByVal VektorA As cls_Point3D, ByVal VektorB As cls_Point3D) As enumVektorenGeradenschnitt
            '|a|= Betrag von a
            '|VektorA|+|VektorB|=|VektorA + VektorB|

            Dim Res1 As Double = 0
            Dim Res2 As Double = 0
            Res1 = Vektoren3DLaengeErmitteln(VektorA) + Vektoren3DLaengeErmitteln(VektorB)
            Res2 = Vektoren3DLaengeErmitteln(Vektoren3DAddieren(VektorA, VektorB))
            If System.Math.Round(Res1, 5) = System.Math.Round(Res2, 5) Then
                Return enumVektorenGeradenschnitt.ParallelGleicheOrientierung
            Else

                'es sind die beiden Vektoren parallel aber unterschiedlich orientiert, wenn
                '(VektorA * VektorB) = - (Betrag von VektorA * Betrag von VektorB).

                Dim Res3 As Double = 0
                Dim Res4 As Double = 0
                Res3 = Vektoren3DMultiplizierenAsDBL(VektorA, VektorB)
                Res4 = Vektoren3DLaengeErmitteln(VektorA) * Vektoren3DLaengeErmitteln(VektorB)
                If System.Math.Round(Res3, 5) = System.Math.Round(Res4 * -1, 5) Then
                    Return enumVektorenGeradenschnitt.ParallelUngleicheOrientierung
                Else
                    Return enumVektorenGeradenschnitt.nichtParallel
                End If
            End If
        End Function

        ''' <summary>
        ''' Diese Funktion ermittelt die Länge eines Vektors
        ''' </summary>
        Public Function Vektoren3DLaengeErmitteln(ByVal Vektor As cls_Point3D) As Double
            'Wurzel Aus (x²+y²+z²)
            Return System.Math.Sqrt((Vektor.x * Vektor.x) + (Vektor.y * Vektor.y) + (Vektor.z * Vektor.z))
        End Function

        ''' <summary>
        ''' Diese Funktion addiert zwei Vektoren.
        ''' </summary>
        Public Function Vektoren3DAddieren(ByVal VektorA As cls_Point3D, ByVal VektorB As cls_Point3D) As cls_Point3D
            'VektorA + VektorB
            Dim VektorReturn As New cls_Point3D
            VektorReturn.x = VektorA.x + VektorB.x
            VektorReturn.y = VektorA.y + VektorB.y
            VektorReturn.z = VektorA.z + VektorB.z
            Return VektorReturn
        End Function

        ''' <summary>
        ''' Diese Funktion subtrahiert zwei Vektoren.
        ''' </summary>
        Public Function Vektoren3DSubtrahieren(ByVal VektorA As cls_Point3D, ByVal VektorB As cls_Point3D) As cls_Point3D
            'VektorA + VektorB
            Dim VektorReturn As New cls_Point3D
            VektorReturn.x = VektorB.x - VektorA.x
            VektorReturn.y = VektorB.y - VektorA.y
            VektorReturn.z = VektorB.z - VektorA.z
            Return VektorReturn
        End Function

        Public Function Vektoren3DSubtrahieren(ByVal Val As Double, ByVal Vektor As cls_Point3D) As cls_Point3D
            'VektorA + VektorB
            Dim VektorReturn As New cls_Point3D
            VektorReturn.x = Vektor.x - Val
            VektorReturn.y = Vektor.y - Val
            VektorReturn.z = Vektor.z - Val
            Return VektorReturn
        End Function

        ''' <summary>
        ''' Diese Funktion ermittelt den Einheitsvektor zu dem übergebenen Vektor.
        ''' </summary>
        Public Function Vektoren3DEinheitsvektorErmitteln(ByVal Vektor As cls_Point3D) As cls_Point3D
            'eVektor = Vektor/Betrag von Vektor
            Dim VektorReturn As New cls_Point3D
            Dim BtragVonVektorA As Double = 0
            BtragVonVektorA = Vektoren3DLaengeErmitteln(Vektor)
            VektorReturn.x = Vektor.x / BtragVonVektorA
            VektorReturn.y = Vektor.y / BtragVonVektorA
            VektorReturn.z = Vektor.z / BtragVonVektorA
            Return VektorReturn
        End Function

        ''' <summary>
        ''' Diese Funktion bildet das Skalarprodukt zweier Vektoren.
        ''' </summary>
        Public Function Vektoren3DSkalarproduktBilden(ByVal VektorA As cls_Point3D, ByVal VektorB As cls_Point3D) As cls_Point3D
            Dim VektorReturn As New cls_Point3D
            'KreuzProdukt   VektorA X VektorB
            VektorReturn.x = ((VektorA.y * VektorB.z) - (VektorA.z * VektorB.y))
            VektorReturn.y = ((VektorA.z * VektorB.x) - (VektorA.x * VektorB.z))
            VektorReturn.z = ((VektorA.x * VektorB.y) - (VektorA.y * VektorB.x))
            Return VektorReturn
        End Function

        ''' <summary>
        ''' Diese Funktion liefert einen Vektor, der das Produkt aus zwei Vektoren ist, als resultat. VektorReturn.x = VektorA.x * VektorB.x ...
        ''' </summary>
        Public Function Vektoren3DMultiplizierenAsVec(ByVal VektorA As cls_Point3D, ByVal VektorB As cls_Point3D) As cls_Point3D
            Dim VektorReturn As New cls_Point3D
            VektorReturn.x = VektorA.x * VektorB.x
            VektorReturn.y = VektorA.y * VektorB.y
            VektorReturn.z = VektorA.z * VektorB.z
            Return VektorReturn
        End Function

        ''' <summary>
        ''' Diese Funktion liefert einen Vektor3 zurück.(Val * VektorB.x) + (Val * VektorB.y) ...
        ''' </summary>
        Public Function Vektoren3DMultiplizierenAsVec(ByVal Val As Double, ByVal VektorB As cls_Point3D) As cls_Point3D
            Dim VektorReturn As New cls_Point3D
            VektorReturn.x = Val * VektorB.x
            VektorReturn.y = Val * VektorB.y
            VektorReturn.z = Val * VektorB.z
            Return VektorReturn
        End Function

        ''' <summary>
        ''' Diese Funktion liefert einen Doublewert zurück.(VektorA.x * VektorB.x) + (VektorA.y * VektorB.y) ...
        ''' </summary>
        Public Function Vektoren3DMultiplizierenAsDBL(ByVal VektorA As cls_Point3D, ByVal VektorB As cls_Point3D) As Double
            Dim ReturnValue As Double
            ReturnValue = (VektorA.x * VektorB.x) + (VektorA.y * VektorB.y) + (VektorA.z * VektorB.z)
            Return ReturnValue
        End Function

        ''' <summary>
        ''' Diese Funktion liefert einen Doublewert zurück.(Val * VektorB.x) + (Val * VektorB.y) ...
        ''' </summary>
        Public Function Vektoren3DMultiplizierenAsDBL(ByVal Val As Double, ByVal VektorB As cls_Point3D) As Double
            Dim ReturnValue As Double
            ReturnValue = (Val * VektorB.x) + (Val * VektorB.y) + (Val * VektorB.z)
            Return ReturnValue
        End Function

        Public Function Vektoren3DDifidieren(ByVal VektorA As cls_Point3D, ByVal Val As Double) As cls_Point3D
            Dim p As New cls_Point3D
            p.x = VektorA.x / Val
            p.y = VektorA.y / Val
            p.z = VektorA.z / Val
            Return p
        End Function

        ''' <summary>
        ''' Diese Funktion ermittelt, ob die Vektoren senkrecht zueinander stehen.
        ''' </summary>
        Public Function Vektoren3DSenkrechtAufeinander(ByVal VektorA As cls_Point3D, ByVal VektorB As cls_Point3D) As Boolean
            If Vektoren3DMultiplizierenAsDBL(VektorA, VektorB) = 0 Then
                Return True
            Else
                Return False
            End If
        End Function

        ''' <summary>
        ''' Diese Funktion ermittelt den Vektor der Normalen der Ebene.
        ''' </summary>
        Public Function Vektoren3DEbenenNormaleErmitteln(ByVal ebene As cls_Ebene) As cls_Point3D
            'VektorN = VektorA Gekreuzt mit VektorB
            Return Vektoren3DSkalarproduktBilden(ebene.VektorU, ebene.VektorV)
        End Function

        'Hesse’sche-Normalenform
        Public Function Vektoren3DHessescheNormalformCErmitteln(ByVal kreuzproduktAusDerEbene As cls_Point3D, ByVal VektorOA As cls_Point3D) As Double 'ByVal Normale As cls_Point3D, ByVal BetragVonN As Double) As Double
            'C = VektorX0 *(VektorN/BetragVon(VektorN) = VektorX0 * VektorEN)
            Dim c As Double = 0
            Dim NormalenVektorBetrag As Double = 0
            NormalenVektorBetrag = Vektoren3DLaengeErmitteln(kreuzproduktAusDerEbene)
            Dim tt As cls_Point3D = Vektoren3DDifidieren(kreuzproduktAusDerEbene, NormalenVektorBetrag)
            c = Vektoren3DMultiplizierenAsDBL(kreuzproduktAusDerEbene, VektorOA)
            Return c
        End Function

        Public Function Vektoren3DEbeneSchneiden(ByVal ebene As cls_Ebene, ByVal VektorGA As cls_Point3D, ByVal VektorGB As cls_Point3D) As cls_Schneideresultat3D
            Dim res As New cls_Schneideresultat3D
            'Prüfung, ob die Gerade und der Normalenvector der Ebene senkrecht aufeinander Stehen (dann ist die Ebene parallel zur Geraden und es gibt keinen Schnittpunkt. )
            If Vektoren3DMultiplizierenAsDBL(Vektoren3DEbenenNormaleErmitteln(ebene), Vektoren3DEinheitsvektorErmitteln(Vektoren3DSubtrahieren(VektorGB, VektorGA))) = 0 Then
                res.Status = cls_Schneideresultat3D.enumSchneideStatus.Parallel
                Return res
            End If

            Dim kreuzproduktAusDerEbene As New cls_Point3D
            kreuzproduktAusDerEbene = Vektoren3DSkalarproduktBilden(ebene.VektorU, ebene.VektorV)

            '  Vektoren3DSkalarproduktBilden(ebene.VektorU, ebene.VektorV)
            Dim c As Double = Vektoren3DHessescheNormalformCErmitteln(kreuzproduktAusDerEbene, ebene.VektorOA)

            'Zwischenschritte
            '(PG1 + t*PGSteigung )* Normalenvektor - C = 0
            '(PG1*Normalenvektor) + (t*PGSteigung*Normalenvektor) - c = 0
            '(PG1*Normalenvektor) - c = - (t*PGSteigung*Normalenvektor)
            '((PG1*Normalenvektor) - c)/(PGSteigung*Normalenvektor)*-1 = t

            Dim PGSteigung As New cls_Point3D(0, 0, 0)
            PGSteigung.x = Vektoren3DSubtrahieren(VektorGA, VektorGB).x
            PGSteigung.y = Vektoren3DSubtrahieren(VektorGA, VektorGB).y
            PGSteigung.z = Vektoren3DSubtrahieren(VektorGA, VektorGB).z

            Dim resB As Double = Vektoren3DMultiplizierenAsDBL(VektorGA, kreuzproduktAusDerEbene) - c
            Dim resC As Double = (Vektoren3DMultiplizierenAsDBL(PGSteigung, kreuzproduktAusDerEbene)) * -1
            Dim t As Double = resB / resC

            '(PG1 + t*PGSteigung )
            Dim pp As cls_Point3D
            pp = Vektoren3DAddieren(VektorGA, Vektoren3DMultiplizierenAsVec(t, Vektoren3DSubtrahieren(VektorGA, VektorGB)))
            res.x = pp.x
            res.y = pp.y
            res.z = pp.z
            res.Status = cls_Schneideresultat3D.enumSchneideStatus.Schneidet

            Return res
        End Function

        ''' <summary>
        ''' Hier wird davon ausgegangen, dass der Tilt-Winkel, um 90Grad gedreht wird,
        ''' also ist dieser 0, wenn der Rückgabewert wagerecht ist.
        ''' Achtung die Länge des Vektors ist immer die angegebene Länge.
        ''' </summary>
        Public Function Vektor3DPunktUeberWinkelUndHypothenuseErrechnen(ByVal AusgangsPunkt As cls_Point3D, ByVal LaengeDerHypothenuse As Double, ByVal WinkelTiltGrad As Double, ByVal WinkelPanGrad As Double) As cls_Point3D
            Dim ret As New cls_Point3D

            'Bei dieser Berechnung wird vom AusgangsPunkt aus, der zu errechnende Punkt gesucht.
            'Dafür werden verschiedene Zwischenpunkte benötigt.
            Dim A As Single = 0
            Dim A1 As Single = 0
            Dim A2 As Single = 0
            Dim B As Single = 0
            Dim C As Single = 0
            Dim C1 As Single = 0
            Try
                '1 = Länge
                'b = y = hypo1
                B = System.Math.Cos(DirectX.Direct3D.Geometry.DegreeToRadian(WinkelTiltGrad - 90)) * LaengeDerHypothenuse
                A1 = (System.Math.Sin(DirectX.Direct3D.Geometry.DegreeToRadian(WinkelTiltGrad - 90)) * LaengeDerHypothenuse) * -1

                'A = x = Hypo1 * cos = AnkatheteX = x
                A2 = (System.Math.Cos(DirectX.Direct3D.Geometry.DegreeToRadian(WinkelPanGrad)) * A1)

                'C = Z
                C1 = System.Math.Sin(DirectX.Direct3D.Geometry.DegreeToRadian(WinkelPanGrad)) * A1

                ret.z = AusgangsPunkt.z + C1
                ret.x = AusgangsPunkt.x + A2
                ret.y = AusgangsPunkt.y + B

            Catch ex As Exception
                ret.z = 0
                ret.x = 0
                ret.y = 0
            End Try

            Return ret
        End Function

    End Class

    '-------------------------------------------------------------------- [/code]



    Mit folgendem Code, können Sie den Beitrag ganz bequem auf ihrer Homepage verlinken



    Weitere Beiträge aus dem Forum Win-Tuning-Portal.de

    3D Scanner benötigt ? - gepostet von rub am Mittwoch 20.06.2007
    Bonussystem| Win-tuning-portal.de + MRZ The Town <Klammto - gepostet von marcus86 am Freitag 23.03.2007



    Ähnliche Beiträge wie "Die Mathe"

    Mathe Klassenarbeit! - Stella (Sonntag 09.07.2006)
    Mathe GK Foegen - Chriz (Montag 30.10.2006)
    MATHE - Giggsy (Dienstag 18.12.2007)
    Der Mathe-Thread - RPG-Man (Mittwoch 17.10.2007)
    Mathe Tipps - Sebastian (Sonntag 13.11.2005)
    Mathe-Klausur - Matze (Donnerstag 08.06.2006)
    mathe - Kunold (Samstag 29.04.2006)
    Mathe - Pascal (Mittwoch 13.09.2006)
    Mathe - Latein-hero (Freitag 15.09.2006)
    Mathe Klausur - Budi (Donnerstag 07.09.2006)