Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've seen some code in word for creating a spiral of stars on a
document. I'm trying to adapt this to Excel.So far I have this:- Const pi = 3.1416 Dim t As Single Dim i As Integer Dim z As Single Dim x As Single, y As Single Dim n As Single 'number of stars per cycle Dim k As Single 'length of spiral Dim sSize As Single 'star size Dim sh As Shape Sub DrawSpiral() n = 80 k = 80000 sSize = 6 For i = 5 To n t = k * pi * i / n x = 2 * (1 / t) * Sin(t) * 100000000 y = 2 * (1 / t) * Cos(t) * 1000000 Set sh = ActiveSheet.Shapes.AddShape(msoShape5pointStar, x, y, sSize, sSize) Next i End Sub Unfortunately it just creates a shower of stars.Not altogether unattractive!but not what I'm after.One of the problems I think is that there seems to be an extra argument for the addshape method in word - a fifth argument which specifies a starting point. Are there any mathematicians out there who can help?? J |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to determine the angle within hexagonal spiral? | Excel Discussion (Misc queries) | |||
Data Points Joined by Spiral !! | Charts and Charting in Excel | |||
how can I change input statement to show only stars for password **** | Excel Discussion (Misc queries) | |||
Cubic Parabola or Cubic Spiral | Excel Worksheet Functions | |||
after creating macro button, closed excel then restarted excel | Excel Discussion (Misc queries) |