Ask a Question related to Macromedia Director 3D, Design and Development.
-
connoru #1
3D Draw Line?
Hi,
I'm very new to 3D so I'm not sure if this is basic or not.
I've created 2D hierarchical tree-structures in the past in using flash and
I'm basically trying to do the same in 3D in Director. I'm trying to use real
3D models through lingo rather than using 3D References and quickLines. So my
question is...If i create two models (spheres) and place them in a 3D Scene,
how can I generate a connecting line between them?
I would like to be able to change this lines thickness.My preference would be
to use a cylinder (model) but I'm unsure how to transform it to the correct
location and rotation. Anyone got any suggestions?
Thanks
Connor
connoru Guest
-
Draw line using Acrobat SDK
I want to draw line on pdf page. I have x,y coordinate depend upon that i want to draw line on page. Thanks in advance -
draw line as a Component
hi all, I have a Cancas A, then I want to display a line as A's display child but not a A's graphic child, how can I do it? thanks steve -
draw line on top of bitmap
Hi, I am trying to draw bitmap on canvas and then lines on top of the bitmap. My code is attached. I found that the lines is alwasy underneath the... -
Math to draw arrow on a line
Hi Anybody know the math to draw an arrow on a line that can point in any direction. The line is drawn using the lineto method. I'm building a... -
draw a line
is it possible to draw a simple line from one point to another. i only want to use two points. i think that the #wire mode will not do the job... -
bgsBS #2
Re: 3D Draw Line?
Hello connor.
While reading your question I also thought of a cylinder as a sulotion to this
problem.
Well, when you create a primitiv using Lingo, you CAN modify its properties,
by changing the model resource properties.
For example:
cyl= member("3D").newModelResource("cylinder01-resource", #cylinder)
creates a new cylinder model resource.
now you should add it to the 3D world:
member("3D").newModel("cylinder01", cyl)
then you can modify its properties, such as height, bottomRadius, topRadius
etc.
now, as for locating the models as you want them to be:
each model has a transform object (if it is indeed an object, and please
currect me if i'm wrong) which you can access using simple modelName.transform,
the trasnform object contains information of the model's current
transformation (scale, position, rotation).
say for example that you have 2 spheres models: sphere1 and sphere2., and you
want to draw a line bitween them.
sphere1 is located in position (0,0,0) and sphere2 is in (0,100,100)
First, you put the cylinder where the first sphere (sphere1) is (using the
transform object) then, you make the cylinder point at sphere2 (using the
pointAt method), then you mesure the distance bitween the 2 spheres (using the
distanceTo vector method), and the last thing you do is to set the cylinder's
height to the same value as the distance.
I'm quite sure that'll do.
bgsBS
bgsBS Guest
-
connoru #3
Re: 3D Draw Line?
:D
That worked a treat. Dunno how I missed the pointAt property.
Now I can plough on. Thanks a million.
C
connoru Guest
-
hondo3000 #4
Re: 3D Draw Line?
i have to add another method here, because it draws just a line between two
points. and it needs less code.
example:
then you have to give the one-polygon-model a toon modifier and set the
renderstyle to point. thats all.
gruss!
(i posted this some time ago, and was not able to find it with the
forum-search, i found it with the google-groups search.)
hondo3000 Guest



Reply With Quote

