View Full Version : Draw a straight line
DickBaldwin
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
John_Clark
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.
DickBaldwin
02-08-2008, 12:19 PM
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
dadcat
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.
DickBaldwin
02-09-2008, 07:59 AM
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
John_Clark
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
DickBaldwin
02-11-2008, 01:05 PM
[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
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
John_Clark
02-12-2008, 11:21 AM
[quote=John_Clark;4603]
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
DickBaldwin
02-13-2008, 08:01 AM
[quote=DickBaldwin;4604]
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
John_Clark
02-13-2008, 12:14 PM
[quote=John_Clark;4613]
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.
DickBaldwin
02-13-2008, 01:09 PM
[quote=DickBaldwin;4621]
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.
I must be running the wrong program. I don't see a box. All I see is a man whose left arm has been ripped off and moved away from the body. The upper arm (blue) stays put while the lower arm and hand move around.
Is that the correct program?
Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free programming tutorials: http://www.dickbaldwin.com/toc.htm
John_Clark
02-14-2008, 11:22 AM
[quote=John_Clark;4622]
I must be running the wrong program. I don't see a box. All I see is a man whose left arm has been ripped off and moved away from the body. The upper arm (blue) stays put while the lower arm and hand move around.
Is that the correct program?
I'm sorry that actually is the right program but I was thinking of something else when I said that the middle part of the arm is the "straight line" and the hand and elbow are the balls that the arm is supost to pivot on. I'm really sorry for the mess up.
DickBaldwin
02-14-2008, 11:54 AM
[quote=DickBaldwin;4624]
I'm sorry that actually is the right program but I was thinking of something else when I said that the middle part of the arm is the "straight line" and the hand and elbow are the balls that the arm is supost to pivot on. I'm really sorry for the mess up.
If you figure out how to draw a line with any position, any length, any orientation, and any color and with a constant thickness regardless of the position, length, and orientation, I would like to hear about it. I'm afraid that drawing string art using an amputated arm wouldn't be very satisfactory.:D
Thanks,
Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free programming tutorials: http://www.dickbaldwin.com/toc.htm
John_Clark
02-15-2008, 11:18 AM
Yea... but like I said it was only ment to be a demo to show what I ment although if I do find another way I will tell you.
DrJim
02-15-2008, 03:01 PM
For a line, you could try the cylinder from http://www.alice.org/community/showthread.php?t=584&highlight=cylinder
(the cylinder in shapes is a bit short to work well) and then just orient, move and resize it in one direction as needed – quick example attached. An added move by half it’s length in one direction would be needed to make the “line” end on the “point” – and of course multiple line segments and points would be needed at the start.
A lot of work to get 3D - but it should be possible. You could also do curves much the same way with multiple torus segments.
DickBaldwin
02-15-2008, 06:03 PM
For a line, you could try the cylinder from http://www.alice.org/community/showthread.php?t=584&highlight=cylinder
(the cylinder in shapes is a bit short to work well) and then just orient, move and resize it in one direction as needed – quick example attached. An added move by half it’s length in one direction would be needed to make the “line” end on the “point” – and of course multiple line segments and points would be needed at the start.
A lot of work to get 3D - but it should be possible. You could also do curves much the same way with multiple torus segments.
Thanks DrJim,
That might do the trick.
Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free programming tutorials: http://www.dickbaldwin.com/toc.htm
TigerWon
02-15-2008, 07:53 PM
go to this website:
http://www.dickbaldwin.com/tocalice.htm
ya c doesnt it tick you off ya exactly tell me what i want to know, dont want to look it up, or else i would have.
DickBaldwin
02-16-2008, 12:17 AM
go to this website:
http://www.dickbaldwin.com/tocalice.htm
ya c doesnt it tick you off ya exactly tell me what i want to know, dont want to look it up, or else i would have.
Unfortunately, there is no information on that web site (or any other web site that I am aware of) regarding the drawing of straight lines with Alice 2.0. If the information was there, I wouldn't have needed to ask.:rolleyes:
Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free programming tutorials: http://www.dickbaldwin.com/toc.htm
John_Clark
02-19-2008, 11:19 AM
Unfortunately, there is no information on that web site (or any other web site that I am aware of) regarding the drawing of straight lines with Alice 2.0. If the information was there, I wouldn't have needed to ask.:rolleyes:
Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free programming tutorials: http://www.dickbaldwin.com/toc.htm
Also didn't you write thosse tutorials yourself anyways?
DickBaldwin
02-19-2008, 11:58 AM
Also didn't you write thosse tutorials yourself anyways?
Sure I did, which is why I am certain that they don't explain what I need to know to do 3D string art in Alice. I don't know of a good way to draw a straight line in Alice 2.0. That is why I asked for suggestions from others in the first place.
Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free programming tutorials: http://www.dickbaldwin.com/toc.htm