As in first Picture I'll have to generate a code
to make a fixed invisible colum

For i = 0 to 360
Step 5


[IMG]http://aycu15.webshots.com/image/47254/2000545622320924840_rs.jpg[/IMG]

Then Each time it itterates the value gets multiplied by Pi and divided by 180

and stored in a similar way like excel.


[IMG]http://aycu37.webshots.com/image/49796/2000584877178128910_rs.jpg[/IMG]

As for the third Picture weve got 4 circles
Pitch
base
Outer
Root
and each one has X, Y

Equations are the same for all 4 circles
the only thing that differs is that.
For example lets consider the Base Circle as shown in 3d picture.
X1 = Base Circle value ( same one used for Y) * Cos ( The stored value from the second picture)
X2 = ......
X360 = .....

Y1 = Base Circle Value * Sin ( The stored Value from the second Picture)
Y2=.....
Y360=......


The remaining three construction circles are built in the same concept but the same concept and same equation but the only one difference is the for pitch circle we use the value from the table of pitch
in Root we use the value assigned for root and so on.

Once weve got the code for all 4 circles. we can draw the circle as a representation of that table.

[IMG]http://aycu13.webshots.com/image/48772/2000586479785060223_rs.jpg[/IMG]

Any help would be welcomed :-)

so what the point here?how far you do this?

Im a mechanical enginner im doing this for my graduation Project. I was asked to rebuilt my excel file all of it -> Visual Basic. i'll do this untill im done ofcourse. heres my excel file.

http://www.zshare.net/download/85156640d56348

So ill need a code like

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Make your arrays
        Dim BaseX(72) As Double
        Dim BaseY(72) As Double
        Dim PitchX(72) As Double
        Dim PitchY(72) As Double
        Dim RootX(72) As Double
        Dim RootY(72) As Double
        Dim OuterX(72) As Double
        Dim OuterY(72) As Double

        'You're filling in these 4 from your other form.
        Dim Rbg_mm As Double
        Dim Rpg_mm As Double
        Dim Rrg_mm As Double
        Dim Rog_mm As Double

        'These are temporary variables to make the calculations easier.
        Dim dblSinTemp As Double
        Dim dblCosTemp As Double
        For i As Integer = 0 To 360 Step 5
            dblSinTemp = Math.Sin((i * Math.PI) / 180.0)
            dblCosTemp = Math.Cos((i * Math.PI) / 180.0)
            BaseX(i \ 5) = Rbg_mm * dblCosTemp
            BaseY(i \ 5) = Rbg_mm * dblSinTemp
            PitchX(i \ 5) = Rpg_mm * dblCosTemp
            PitchY(i \ 5) = Rpg_mm * dblSinTemp
            RootX(i \ 5) = Rrg_mm * dblCosTemp
            RootY(i \ 5) = Rrg_mm * dblSinTemp
            OuterX(i \ 5) = Rog_mm * dblCosTemp
            OuterY(i \ 5) = Rog_mm * dblSinTemp
        Next

        'That's it.  

    End Sub
End Class

i dont know wheather my code is ok or not. May you please look into it ?

If im to drawn 4 circles from this code What approch would i use ?


Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Make your arrays
        Dim BaseX(72) As Double
        Dim BaseY(72) As Double
        Dim PitchX(72) As Double
        Dim PitchY(72) As Double
        Dim RootX(72) As Double
        Dim RootY(72) As Double
        Dim OuterX(72) As Double
        Dim OuterY(72) As Double

        'You're filling in these 4 from your other form.
        Dim Rbg_mm As Double
        Dim Rpg_mm As Double
        Dim Rrg_mm As Double
        Dim Rog_mm As Double

        'These are temporary variables to make the calculations easier.
        Dim dblSinTemp As Double
        Dim dblCosTemp As Double
        For i As Integer = 0 To 360 Step 5
            dblSinTemp = Math.Sin((i * Math.PI) / 180.0)
            dblCosTemp = Math.Cos((i * Math.PI) / 180.0)
            BaseX(i \ 5) = Rbg_mm * dblCosTemp
            BaseY(i \ 5) = Rbg_mm * dblSinTemp
            PitchX(i \ 5) = Rpg_mm * dblCosTemp
            PitchY(i \ 5) = Rpg_mm * dblSinTemp
            RootX(i \ 5) = Rrg_mm * dblCosTemp
            RootY(i \ 5) = Rrg_mm * dblSinTemp
            OuterX(i \ 5) = Rog_mm * dblCosTemp
            OuterY(i \ 5) = Rog_mm * dblSinTemp
        Next

        'That's it.  

    End Sub
End Class
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.