Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Draw a straight line
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default Draw a straight line - 02-08-2008, 08:55 AM

Just for fun, I would like to write a 3D version of the string-art program at

http://scratch.mit.edu/projects/Paddle2See/89023

Does anyone know how to draw a straight colored line between two points in Alice 2.0 3D space?

Thanks,
Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free programming tutorials: http://www.dickbaldwin.com/toc.htm
   
Reply With Quote
Old
John_Clark
Guest
 
Status:
Posts: n/a
Default 02-08-2008, 11:52 AM

I have an idea but I'm not 100% sure it will work but I will still throw it out is you could make a straight line in paint or something and import it on a billboard and then assign each line to a set a moreable spheres and have them move on the axis of the spheres. Good luck and I hope this works for you.
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 02-08-2008, 12:19 PM

Quote:
Originally Posted by John_Clark View Post
I have an idea but I'm not 100% sure it will work but I will still throw it out is you could make a straight line in paint or something and import it on a billboard and then assign each line to a set a moreable spheres and have them move on the axis of the spheres. Good luck and I hope this works for you.
I assume that you mean moveable spheres instead of moreable spheres.

I don't know what you mean by "assign each line to a set a moveable spheres and have them move on the axis of the spheres." Can you describe that process in more detail, or perhaps provide a short sample program that implements the process.

Thanks,
Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free programming tutorials: http://www.dickbaldwin.com/toc.htm
   
Reply With Quote
Old
dadcat
Guest
 
Status:
Posts: n/a
Default 02-08-2008, 10:27 PM

Probably far from optimal, but you can insert axes, resize two of them (up and right) to negligable size (.001). Do the same for the forwardSign, and change the color of forward object to whatever color you want.
You still have an arrowhead at one end and getting it to extend from one specified point to another isn't entirely trivial, but move to, point at and resize should be able get the job done.
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 02-09-2008, 07:59 AM

Quote:
Originally Posted by dadcat View Post
Probably far from optimal, but you can insert axes, resize two of them (up and right) to negligable size (.001). Do the same for the forwardSign, and change the color of forward object to whatever color you want.
You still have an arrowhead at one end and getting it to extend from one specified point to another isn't entirely trivial, but move to, point at and resize should be able get the job done.
Very creative idea. Unfortunately, the thickness of the resulting object increases and decreases in proportion to its length.

Thanks,
Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free programming tutorials: http://www.dickbaldwin.com/toc.htm
   
Reply With Quote
Old
John_Clark
Guest
 
Status:
Posts: n/a
Default 02-11-2008, 11:49 AM

[QUOTE=DickBaldwin;4590]Very creative idea. Unfortunately, the thickness of the resulting object increases and decreases in proportion to its length.

Ya thats kind of what I ment sorry if i wasnt clear but what I mean is have the lines connected to the spheres and and the spheres pivot on an axis to connect to another set of spheres to make shapes
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 02-11-2008, 01:05 PM

[quote=John_Clark;4603]
Quote:
Originally Posted by DickBaldwin View Post
Very creative idea. Unfortunately, the thickness of the resulting object increases and decreases in proportion to its length.

Ya thats kind of what I ment sorry if i wasnt clear but what I mean is have the lines connected to the spheres and and the spheres pivot on an axis to connect to another set of spheres to make shapes
I must be dense, but I'm afraid I still don't understand. Any chance you could write a short sample program that demonstrates your idea.

Thanks,
Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free programming tutorials: http://www.dickbaldwin.com/toc.htm
   
Reply With Quote
Old
John_Clark
Guest
 
Status:
Posts: n/a
Default 02-12-2008, 11:21 AM

[QUOTE=DickBaldwin;4604]
Quote:
Originally Posted by John_Clark View Post

I must be dense, but I'm afraid I still don't understand. Any chance you could write a short sample program that demonstrates your idea.
Ok I will although I really don't think it is because your dense but probly because of my explaining because I know I don't always explain stuff very well. Ok this will hopefully demo what I mean and I'm really sorry for the cruidity although it was done movie style because I used a hand model
Attached Files
File Type: a2w semi good demo.a2w (541.3 KB, 388 views)

Last edited by John_Clark; 02-12-2008 at 11:48 AM.
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 02-13-2008, 08:01 AM

[quote=John_Clark;4613]
Quote:
Originally Posted by DickBaldwin View Post
Ok I will although I really don't think it is because your dense but probly because of my explaining because I know I don't always explain stuff very well. Ok this will hopefully demo what I mean and I'm really sorry for the cruidity although it was done movie style because I used a hand model
I ran the demo but I didn't see any straight lines. What am I missing?

Thanks,
Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free programming tutorials: http://www.dickbaldwin.com/toc.htm
   
Reply With Quote
Old
John_Clark
Guest
 
Status:
Posts: n/a
Default 02-13-2008, 12:14 PM

[QUOTE=DickBaldwin;4621]
Quote:
Originally Posted by John_Clark View Post

I ran the demo but I didn't see any straight lines. What am I missing?
I'm sorry about that but at the time I didn't have a working paint program to draw a straight line in and I didn't have alot of time to make the program before my next class so I subbed a box in for the line. So the box is "technicly" the straight line.
   
Reply With Quote
Reply


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.