Channels

Channels are simply vectors of points.

Viewing Channels

To switch between model view or channel view, use the view command. You can also split windows to view both. change the view to model or channel view
view <model|channel>

Split the screen vertically
Vexplore
Split the screen horizontally
Sexplore

Addition, Subtraction, Multiplication, and Division of Channels

For calls that have the storeObj, that parameter represents the object that you would like to store the result in. These calls are similar to those made in assembly language:

channel <op> <storeObj> <opObj1> <opObj2>
channel sub <storeObj> <opObj1> <opObj2>
channel add <storeObj> <opObj1> <opObj2>
channel mult <storeObj> <opObj1> <opObj2>
channel div <storeObj> <opObj1> <opObj2>

Combine components of channels to create a new channel

This will take the y coordinates, the value, of each channel and create a new channel with corresponding x,y, and z values. This is useful for writing data out to a channel file for use in MatLab.
channel combine <storeObj> <opObj1> <opObj2> [<opObj3>]

Take derivatives

channel derivative

Create trig functions

channel sine
channel cosine
Here is an example where an audio file was read in as a channel:
Channels - www.vim3d.com

Channels are very useful for animations, and due to their relation to dat files, can be used to produce data. Here is an example of using the differentiation properties of Channels to compute velocities of a robot.

This example demonstrates project channels as a series of vectors onto an orientation vector of a path to get relative velocities from global velocities.


Channels - www.vim3d.com

#geometry
begin draw
-42.986359 0.000000 -161.505905
72.144562 0.000000 -133.049271
53.007648 0.000000 -75.100830
25.311291 0.000000 -71.369354
72.692039 0.000000 -35.115093
84.370277 0.000000 -0.051152
69.576408 0.000000 17.777941
110.200920 0.000000 54.075329
101.548195 0.000000 79.260445
134.768860 0.000000 129.695953
99.624092 0.000000 157.830841
81.754204 0.000000 190.876801
28.939680 0.000000 150.262802
-52.572563 0.000000 156.140579
-56.888523 0.000000 96.161293
-118.679916 0.000000 62.400398
-102.872795 0.000000 -18.442293
-139.617828 0.000000 -68.077019
-126.845184 0.000000 -120.871452
-90.685837 0.000000 -76.121346
-46.543739 0.000000 -45.473595
-43.460850 0.000000 -6.188660
-6.035586 0.000000 2.403744
0.104409 0.000000 -57.808102
-27.539986 0.000000 -96.501686
-36.144970 0.000000 -126.619606
-72.958359 0.000000 -128.988510
-106.687439 0.000000 -158.401428
-144.618301 0.000000 -147.844040
end
name path
bspline 10

begin draw
8.133569 0.000000 -39.505905
115.961449 0.000000 -40.900230
147.566162 0.000000 -39.041130
152.678696 0.000000 -22.309217
157.791229 0.000000 0.000000
155.002579 0.000000 10.225058
133.158142 0.000000 19.520565
110.848915 0.000000 19.520565
40.203068 0.000000 17.661463
end
name sphere
revolve 360 0 0 1
poly scale 0.1
poly rotate 90 0 0 1
poly rotate 90 1 0 0
path sphere path

add cam
name headCam
path headCam path 0 10 0 1 -5
lookat headCam sphere


begin draw 
0 0 -10
end
name point
copy point path align points
name wheel2

begin draw 
0 0 10
end
name point2
copy point2 path align points
name wheel1

convert wheel1 channel
convert wheel2 channel
convert path channel

Sexplore
view channel

s tx0
c derivative
name dx0
s tz0
c derivative
name dz0

s tx1
c derivative
name dx1
s tz1
c derivative
name dz1

s tx2
c derivative
name orientX
s tz2
c derivative
name orientZ

# the z is in the y place!
c combine leftWheel dx0 dz0
c combine rightWheel dx1 dz1
c combine orient orientX orientZ

c project projR orient0 rightWheel0
c project projL orient0 leftWheel0

s tx2
c solo
s tx1
c enable
s tx0
c enable

s dx0
c enable
s dx1 
c enable

disp wireframe
disp axis
disp ortho

Vexplore
add cam
cam top
m 0 160 0
This was a demo for this project at Cal Day at UC Berkeley:
Channels - www.vim3d.com