View Full Version : Going round in circles..
clueless
04-30-2008, 11:29 AM
Hi I'm hoping there's a maths expert around here.lol. What id like to do is plot 360 X,y points around a circle (or maybe 180 if the circle is small). I think AMS has the maths functions to do this.
longedge
04-30-2008, 12:06 PM
Check out StefanM's post HERE (http://www.indigorose.com/forums/showthread.php?t=9289).
clueless
04-30-2008, 03:14 PM
thanks.. thats exactly what i was looking for :)
clueless
05-21-2008, 04:03 PM
That is a very useful bit of script, i had a play about and extended it into a function for creating multi-sided shapes in images (hexagon , pentagon..etc)..
function DrawMultiSidedShape( fName, nLineColor , nLineThickness , nCenterX , nCenterY , nRadius , nSides )
local inc = 0;
local StartX = 0; -- Start of line co-ordinates.
local StartY = 0;
local EndX = 0; -- end of line co-ordinates.
local EndY = 0;
local LastX = 0;
local LastY = 0;
image.Open( fName );
local w = 2 * math.pi / nSides;
for inc = 1 , nSides do
if inc == 1 then
StartX = nCenterX + nRadius * Math.Cos( w * ( inc - 1 ) );
StartY = nCenterY + nRadius * Math.Sin( w * ( inc - 1 ) );
LastX = StartX;
LastY = StartY;
else
EndX = nCenterX + nRadius * Math.Cos( w * ( inc - 1 ) );
EndY = nCenterY + nRadius * Math.Sin( w * ( inc - 1 ) );
PixDrawLine( nLineColor , nLineThickness , StartX , StartY , EndX , EndY );
StartX = EndX;
StartY = EndY;
end
end
image.DrawLine( nLineColor , nLineThickness , StartX , StartY , LastX , LastY );
image.Save()
end
I used Ssides Image.dll (http://www.indigorose.com/forums/showthread.php?t=20571) to draw the line. This script could easily be adapted from here to make all sorts of 'Spirograph' style shapes.
AudioSam
05-22-2008, 03:48 AM
Could you post an example of this.
Sounds intresting , but I can't get it to work.
Thanks,
AudioSam
clueless
05-22-2008, 11:34 AM
No problems. :cool
AudioSam
05-22-2008, 11:50 AM
Thanks alot Clueless.
I'm about to have a look at it.
I didn't know if it was top secret or not....;)
Looked at it and had time to edit..
Very nice.
I can see what you mean.
All types of effects are possible with this.
I'll mess with this a few days now..
Thanks and have a nice day,
Audiosam
clueless
05-22-2008, 12:24 PM
Ive been making an animation/image editor , this was from one of the drawing functions. Im going to try to extend it into a vector line function next but with the main image,marquee selection,grid overlays,calculating snap to grid,shapes,zoom and changing the cursor when over handles for movable objects in the image im finding it harder and harder to squeeze it all into a single screen refresh without the program slowing down.lol
AudioSam
05-22-2008, 12:30 PM
I'm looking at it now.
I am thinking about active to curent volume.
Volume low, small shape to a little larger shape and color.
Volume moves up, a larger shape to a little larger shape and color.
I guess colors are
red
green
blue
black
yellow
purple
I'm messing around with the colors right now.
Thanks again,
Audiosam
Thanks for a very nice example.
clueless
05-22-2008, 02:22 PM
I wonder how to get the shape rotate? I know bits of vector maths but not much.
clueless
05-22-2008, 02:40 PM
lol.. that wasnt so difficult :cool
AudioSam
05-22-2008, 04:34 PM
I'm just checking in to see what you have going.
I'll go across and download your latest.
Nothing better than new toys..
I like the first apz .
You might have already known, there were a few
things to correct as far as the enable buttons.
I was messing with that before I got side tracked.
I'll be back in a few minutes.
A lot of the things you post are over my head.
This one I like and I can understand it.:yes
Thanks Clueless,
AudioSam
AudioSam
05-22-2008, 04:55 PM
lol.. that wasnt so difficult :cool
Good job Clueless...
Unlimited graphics tricks with this toy..
I'll be messing with this for awhile.
Mix a few colors in and mess with timer actions..
Bad ,Cool, and Wicked all in one.
I like music apps and graphics so this is
something I like alot.:yes
AudioSam
clueless
05-22-2008, 05:15 PM
Here's one a little more animated. Im having fun with this ;)
AudioSam
05-22-2008, 05:24 PM
Yeah,,,,
Looks like lots of possibilities..
I'm messing with it as well.
Got something pretty good going here.
I'll look at what you just posted.
I know it's going to be good already..:yes
Of course you got it going, I'm just using what you started... lol
AudioSam
Looking at it now!!!! GreaTTTT !!!!
Got Kid Rock going, looking at the shapes....
Can't top this...
Xcelent Clueless...
Man this is the shi~!!!!!
A +++++
AudioSam
05-22-2008, 05:34 PM
There are effects here that are going to work great with players...:yes
Ok, where are all the other Thank you's ????
This is really a very good addition to an already Great Program..:yes
AMS is the bestest !!!!
I think this may run a close second....
Thank You Clueless,:D
Intrigued
05-22-2008, 07:24 PM
Nice job.
:yes
clueless
05-23-2008, 01:24 AM
It would be good if it was all a little smoother. It might be a better idea to pre-calculate some color sequences in rather than try and increment the values. This would definatley make it less stressfull on the eyes. It should be quite easy to use a live sound input to triger cycling through pre-programmed color sequences which then gives the illusion of animation.
This program only uses win32 colors to , if you add Sside's Color.dll to the program you have access to .Net colors and alpha(transparency) values.This should also make the whole thing look a lot smoother to :)
AudioSam
05-23-2008, 09:24 AM
I have been messing with the colors and speed.
I'm using a 2.79 GHz, 2.00 GB or Ram so it's running pretty smooth.
I noticed it does use a god bit of CPU.
Still, it's very good for lots of swirling lines and patterns.
I know with time better effects are sure to happen.
Good Job,:yes
AudioSam
Dermot
05-24-2008, 02:28 PM
That's awesome. :yes:yes It's very fast and pretty smooth, nice job.
clueless
05-26-2008, 07:46 AM
lol. This is a nightmare, looks like im going to actually work out how Cos & sin work to make any real improvements on the way this runs.
Ive been tweeking the code and comming up with some intresting results but they are never what i expect each time.
clueless
05-27-2008, 07:06 PM
I think ive got things running a bit smoother now.
AudioSam
05-28-2008, 03:56 AM
I'm following this thread.
Good work on your latest apz.
I'm messing with your earlier example.
I haven't posted anything , nothing really special
to show yet.
Thank you for this.
If I come up with something great, I'll post.
I didn't want you to think I wsn't following
this any more.
Have a nice day,
AudioSam
Esfahan
05-28-2008, 07:35 AM
clueless
The best work:yes
U are Master in Animation and graphic.
clueless
05-28-2008, 08:03 AM
I'd like to try making this run off music but im not sure how to grab live input. Does anyone have any ideas>?
clueless
06-27-2008, 12:17 AM
Thanks for all the support guys.. heres the latest version of the Vector animation demo . This is a much more refined version with a few more options that allow you to produce more complex patterns.
This version an option to record the pattern to an AVI when animating.
Also when the shape isnt moving you can pull the points of the shape around the screen. This serves no real perpous other than to demonstrate how to create true vector shapes on screen that can be edited :D
Thanks to Sside for the Image.dll and AVI.dll.
-Have fun
Intrigued
06-27-2008, 05:32 PM
Mirrored on amsuser.com, at:
http://www.amsuser.com/ams/examples/AniVec_V3_Clueless.apz
Thanks
clueless
06-27-2008, 06:13 PM
Thats about as far as im going this that program.. im gonna try some 3d stuff next :P
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.