This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > VRML > December 2003 > hwo would you solve this ?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author hwo would you solve this ?
Robert Ludewig

2003-12-04, 1:01 pm

This is what I need to do:

a Pen (just a simple cone) draws in a room. Whereever the pen goes, it
leaves (produces) a trail of thin long boxes. The pen only must be
able to do straight lines. I must be able to control the speed of the
pen, the startposition, the direction and the length of the way it
goes.

For example:

draw a shape of the letter 'V' :

move 5 units downwards using direction one, using speed one
move 5 units upwards using directon two, using speed two

the result will be two long thin boxes forming the letter 'V'.

If you have some hints fo me I would be very glad ....

I made a little example scene that shows how it should look like. It
has nothing of the above described dynamics. It just draws a simple
straight "line". I was not able to find out more until now.
I probally have to use PROTO and SCRIPT nodes somehow. Bot how ?

---------------- cut here -------------------------

#VRML V2.0 utf8
DEF trans_Wurm1 Transform
{
children DEF shp_Cylinder Shape
{
appearance Appearance
{
material Material
{
}
}
geometry Box
{
size 0.1 0.1 0.1
}
}
center -0.05 0 0
translation 1000.0 0.0 0.0
}
DEF trans_Schicht1 Transform
{
children DEF trans_Umdreh Transform
{
children DEF shape_LaserHead Shape
{
appearance Appearance
{
material DEF mat_LaserHead Material
{
ambientIntensity 0
diffuseColor 0.44 0.15 0
specularColor 0.78 0.69 0.4
emissiveColor 0 0 0
shininess 0.12
transparency 0
}
}
geometry Cone
{
height 1
bottomRadius 0.4
}
}
center 0 0.3 0
rotation 1 0 0 3.1416
}
translation 1000 0 0
}
Transform
{
children
[
Shape
{
appearance Appearance
{
material Material
{
ambientIntensity 0.047619
diffuseColor 0.21 0.09 0.02
specularColor 0.94 0.22 0.8
emissiveColor 0.19 0.02 0.05
shininess 0.1
transparency 0
}
}
geometry Sphere
{
}
}
DEF touchSens_On TouchSensor
{
enabled TRUE
}
]
translation 3 2 2
scale 0.330027 0.330027 0.330027
}
DEF timeSens_Schicht1 TimeSensor
{
enabled TRUE
startTime 0
stopTime 0
cycleInterval 10
loop FALSE
}
DEF timeSens_Schicht2 TimeSensor
{
enabled TRUE
startTime 0
stopTime 0
cycleInterval 10
loop TRUE
}
DEF posIntp_Schicht1 PositionInterpolator
{
key [ 0, 1 ]
keyValue
[
-2 0 0 ,
3 0 0
]
}
DEF posIntp_scaleWurm1 PositionInterpolator
{
key [ 0, 1]
keyValue
[
0 1 1,
50 1 1
]
}
DEF posIntp_Wurm1 PositionInterpolator
{
key [ 0, 1]
keyValue
[
-2 0 0,
-2 0 0
]
}
ROUTE touchSens_On.touchTime TO timeSens_Schicht1.startTime
ROUTE timeSens_Schicht1.fraction_changed TO
posIntp_Schicht1.set_fraction
ROUTE timeSens_Schicht1.fraction_changed TO posIntp_Wurm1.set_fraction
ROUTE timeSens_Schicht1.fraction_changed TO
posIntp_scaleWurm1.set_fraction


ROUTE posIntp_Schicht1.value_changed TO trans_Schicht1.translation
ROUTE posIntp_Wurm1.value_changed TO trans_Wurm1.translation
ROUTE posIntp_scaleWurm1.value_changed TO trans_Wurm1.scale

ROUTE timeSens_Schicht1.stopTime TO timeSens_Schicht2.startTime
ROUTE timeSens_Schicht1.fraction_changed
TO posIntp_Schicht1.set_fraction
ROUTE posIntp_Schicht1.value_changed TO trans_Schicht1.translation


Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews