|
Author |
Topic: just playing (Read 2653 times) |
|
Markavian
|
Re: just playing
« Reply #1 on: Apr 14th, 2004, 5:06pm » |
|
Yeup, thats a really sweet piece. Its a bit faded, I think there could be a bit more definition. I've got a big screen and it was kinda difficult to view it. What were you plans for this? If your just attempting to create an 'it looks cool' enviroment, maybe use a portion on the right hand side to bring up some more stats about objects and connections... you've already gone a bit 'Over The Top' with all the x,y coordinate lines, but it all looks good. - Markavian
|
|
|
|
Charles Hinshaw
|
Re: just playing
« Reply #2 on: Apr 14th, 2004, 7:42pm » |
|
the darkness of each object is based on the number of connections -- it tends to work best at about 20 connections, where it looks a bit like a moving blueprint. the whole noise-based movement was really just a filler concept, the next step is to get them to move towards any others that they have connections to... to create a bit of group cohesion. after that it is to insert them into some sort of flow field... and, eventually to tie it into my density map examples for building transitions. mostly, at this point, it is just one of those thought it looked cool examples.
|
Charles Hinshaw PHAERSE
http://www.phaerse.com
|
|
|
Charles Hinshaw
|
Re: just playing
« Reply #3 on: Apr 15th, 2004, 3:53am » |
|
the next phase ... http://www.charleshinshaw.com/ball2/ click anywhere to add a new object. help: *****EDIT sometimes the original random assortment of locations produces something balanced, but other times, it doesn't. if everything finds a happy resting place in the beginning, click a few times to create the effect i described below: ****** uhm... ok, so it isn't doing exactly what I had in mind. my original intent was for it to collapse in upon itself, and it does that, but it also goes (for lack of a better description) crazy and spasms about the screen before hiding in a corner. how can i make this more stable?
|
« Last Edit: Apr 15th, 2004, 3:55am by Charles Hinshaw » |
|
Charles Hinshaw PHAERSE
http://www.phaerse.com
|
|
|
arielm
|
Re: just playing
« Reply #4 on: Apr 15th, 2004, 9:39am » |
|
there's a simple solution to this kind of problem: - applying constraints between 2 or more "nodes" (e.g. a specific distance must be kept, eventually with some springiness) - the key point in order to bring some order into chaos is: to iterate a respectable number of times on the constraint-satisfying function an example with source code: http://www.chronotext.org/toys/Wire.htm it's a system with 1600 nodes, each of them is starting with totally random coordinates, then the system is progressively (depending on the "number of iterations" mentioned above) stabilizing. note: if you don't need inertia/friction, the Verlet() function call can be ignored, which results in a fairly simple piece of code regarding to what it does... the original/famous/useful paper behind all this is: http://www.gamasutra.com/resource_guide/20030121/jacobson_pfv.htm hth
|
« Last Edit: Apr 15th, 2004, 9:44am by arielm » |
|
Ariel Malka | www.chronotext.org
|
|
|
Markavian
|
"just playing"
« Reply #5 on: Apr 16th, 2004, 4:50pm » |
|
Hi Charles, I edited the code on ball2 to 'move' a bit more like you intended.... possibly. http://mkv25.net/applets/ch_ball3/ I also noted that you'd linked each node, to every other node, which seemed a bit unecessary... so I added keyboard function that only linked each node to every Nth node. Press 1 for full connections, 2 for 1/2 connections, 3 for 1/3 connections, etc... since that effects movement. Is that more towards what you were aiming for? Regards, - Markavian
|
|
|
|
Charles Hinshaw
|
Re: just playing
« Reply #6 on: Apr 16th, 2004, 11:37pm » |
|
Dropping the number of connections seems to work a bit better -- it adds stability to the outer nodes, but the system still always creates a group of 3 or 4 nodes that are violently moving about one another and swallowing up other nodes. I took a look at Ariel's worm toy -- and tried a quick modification to see what would happen if instead of just linking to the next node progressivly (in a chain) nodes reacted to any node nearby. The effect was similar... undulating balls of nodes flying about the screen. Perhaps I need to re-define my objective externally of the program and pursue this from a different angle?
|
Charles Hinshaw PHAERSE
http://www.phaerse.com
|
|
|
Markavian
|
Re: just playing
« Reply #7 on: Apr 17th, 2004, 11:19am » |
|
The base structure of creating the nodes seems fine, what you don't have is decent logic for movement. Perhaps you should aim to only create connections with nodes within a certain distance, and then actually record the connection in an array stored in the node. e.g. each node knows where its connected, then you can perform some fancy logic based on 'how many connections', and look at the length of each connection, should the connection be longer/shorter, etc... and then you might get apparent networks being formed. For a bit of spin, each node would have a random 'max/min' connection distance on creation, meaning that nodes don't just fall into hexagonal triangles, or whatever.
|
|
|
|
Markavian
|
Ball Network (v4)
« Reply #8 on: Apr 17th, 2004, 12:57pm » |
|
Not the most beautiful piece of processing code, but interestingly reactive. Let nodes randomly add themselves to the stage. Eventually, due to overcrowding, the whole system begins to oscillate around itself trying to reach a state of neutrality. http://mkv25.net/applets/ball_network_4/
|
|
|
|
Charles Hinshaw
|
Re: just playing
« Reply #9 on: Apr 17th, 2004, 11:38pm » |
|
It is a step back in functionality, because I haven't gone back through to implement connections (and I stuck noise-based motion in so that it wasn't totally boring), but if we have the network be the class, and the x and y coordinates of each node stored in arrays, it gives the future options of having multiple networks at one time, as well as introducing ways to modify the network as a whole. I also removed the adding of new nodes at this point -- maybe we could add node-interaction -- maybe they are repelled by the mouse. http://www.charleshinshaw.com/ball5/
|
« Last Edit: Apr 17th, 2004, 11:38pm by Charles Hinshaw » |
|
Charles Hinshaw PHAERSE
http://www.phaerse.com
|
|
|
Markavian
|
Re: just playing
« Reply #10 on: Apr 18th, 2004, 12:19am » |
|
I agree on taking the step back to renew the class. I like the look of the motion on the new model. Definitely needs some sort of connections to be formed. What about indivual 'node development'/properties? What are your new aims then? For now, as titled, I'll just have another play. Regards, - Markavian
|
|
|
|
Markavian
|
Pink Version
« Reply #11 on: Apr 18th, 2004, 1:40am » |
|
This version, err, I redid the colouring system again, so I can change the hue more easily. http://mkv25.net/applets/ball_network_6/ I also added code for creating nodes that I feel comfortable with. If you look at ball_network_4, I used the 'in_int_array()' function to check for existing connections in other nodes. Because of the new network class, I replaced this method with a table of connections (connections[i][j]). I chose a relatively straightforward 'distance based' connection rule connections are only formed when nodes are closer then a given distance. I then thought, wouldn't it be useful to track the number of connections per node, hence 'int neighbors[]'. I then used the value of neighbors to draw a scaled circle around each node (like I saw somewhere else) and also to affect the speed of the noise transition. The end effect, as a node enters a crowded space, it forms more connections, and its local 'time' (how fast it processes noise) speeds up, making it move faster.. and usually outside the crowded area. Just to emphasise the use of the class as an independant entity, I put two on the stage, and altered the number of nodes. I'll let you Charles, or someone else, take it another step from there. Regards, - Markavian
|
|
|
|
|