LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default creating a SPIRAL of stars in Excel

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to determine the angle within hexagonal spiral? Eric Excel Discussion (Misc queries) 22 December 31st 07 10:41 AM
Data Points Joined by Spiral !! monir Charts and Charting in Excel 0 July 21st 07 10:16 PM
how can I change input statement to show only stars for password **** SAM SEBAIHI Excel Discussion (Misc queries) 5 December 9th 06 06:34 PM
Cubic Parabola or Cubic Spiral Michael M Excel Worksheet Functions 0 August 7th 06 11:19 PM
after creating macro button, closed excel then restarted excel hjd43 Excel Discussion (Misc queries) 1 March 3rd 05 03:04 AM


All times are GMT +1. The time now is 10:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"