Go to Post “FIRST is your experience and you cannot let anyone else hinder what you can achieve.” - fuzzwaz [more]
Home
Go Back   Chief Delphi > Technical > IT / Communications > 3D Animation and Competition
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #15   Spotlight this post!  
Unread 15-02-2004, 17:41
Koko Ed's Avatar
Koko Ed Koko Ed is offline
Serial Volunteer
AKA: Ed Patterson
FRC #0191 (X-Cats)
Team Role: Mentor
 
Join Date: Mar 2002
Rookie Year: 2002
Location: Rochester,NY
Posts: 22,945
Koko Ed has a reputation beyond reputeKoko Ed has a reputation beyond reputeKoko Ed has a reputation beyond reputeKoko Ed has a reputation beyond reputeKoko Ed has a reputation beyond reputeKoko Ed has a reputation beyond reputeKoko Ed has a reputation beyond reputeKoko Ed has a reputation beyond reputeKoko Ed has a reputation beyond reputeKoko Ed has a reputation beyond reputeKoko Ed has a reputation beyond repute
Re: Cybersonics 103 Animation Teaser...

Quote:
Originally Posted by reisser
on ChannelsUsed pCont do
(
pCont.useTime = true
pCont.useInteger = true
pCont.usePosition = true
pCont.useSpeed = true
)

on Init pCont do
(
count = pCont.NumParticles()

--random targets
for i in 1 to count do
(
pCont.particleIndex = i
pCont.particleInteger = random 0 23
)
)

on Proceed pCont do
(
count = pCont.NumParticles()

for i in 1 to count do
(
pCont.particleIndex = i

--determine distance from origin (correct straying particles)
point = pCont.particlePosition
dist = sqrt ((point.x * point.x) + (point.y * point.y))
dist = sqrt ((dist * dist) + (point.z * point.z))

--adjust stray particles
if dist > 50 then
(
if point.x > 0 then
pCont.particlePosition.x = pCont.particlePosition.x - .25
else
pCont.particlePosition.x = pCont.particlePosition.x + .25

if point.y > 0 then
pCont.particlePosition.y = pCont.particlePosition.y - .25
else
pCont.particlePosition.y = pCont.particlePosition.y + .25

if point.z > 0 then
pCont.particlePosition.z = pCont.particlePosition.z - .25
else
pCont.particlePosition.z = pCont.particlePosition.z + .25
)

--set target position
sel = execute("$conn_target_" + pCont.particleInteger as string + ".pos")

--find vector of separation
vect = sel - pCont.particlePosition

--set target finding
pCont.particleSpeed = vect / 1000

--success test, is particle considerably close to target?
if ((vect.x > -4) and (vect.x < 4)) and ((vect.y > -4) and (vect.y < 4)) and ((vect.z > -4) and (vect.z < 4)) then
(
--choose new target at random
old = pCont.particleInteger
do
(
num = random 0 23
if not (old == num) then
new = true
)
while new = false
pCont.particleInteger = num
--store position
pos = pCont.particlePosition

--spawn new on success
pCont.AddParticle()
pCont.particleIndex = pCont.NumParticles()
pCont.particlePosition = pos
do
(
num = random 0 23
if not (old == num) then
new = true
)
while new = false
pCont.particleInteger = num
)
)
)

on Release pCont do
(

)
What the...?
__________________
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A joke they called Regional Animation Competitions Lev 3D Animation and Competition 50 18-03-2003 21:18
Image Discuss: Team 108 Animation Teaser CD47-Bot Extra Discussion 4 14-03-2003 13:22
Cybersonics Team 103 Animation Complete reisser 3D Animation and Competition 17 02-03-2003 16:10
2002 Animation Software Jay Lundy 3D Animation and Competition 34 26-02-2002 20:40
How to develop your animation idea and keep your sanity too! Robby O 3D Animation and Competition 0 25-01-2002 01:25


All times are GMT -5. The time now is 18:58.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi