Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   Draw a straight line (http://www.alice.org/community/showthread.php?t=1177)

 DickBaldwin 02-08-2008 09:55 AM

Draw a straight line

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

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: [url]http://www.dickbaldwin.com/tocalice.htm[/url]
Free programming tutorials: [url]http://www.dickbaldwin.com/toc.htm[/url]

 John_Clark 02-08-2008 12:52 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.

 DickBaldwin 02-08-2008 01:19 PM

[quote=John_Clark;4583]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.[/quote]

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: [url]http://www.dickbaldwin.com/tocalice.htm[/url]
Free programming tutorials: [url]http://www.dickbaldwin.com/toc.htm[/url]

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 08:59 AM

[quote=dadcat;4588]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.[/quote]

Very creative idea. Unfortunately, the thickness of the resulting object increases and decreases in proportion to its length.

Thanks,
Dick Baldwin
Free Alice tutorials: [url]http://www.dickbaldwin.com/tocalice.htm[/url]
Free programming tutorials: [url]http://www.dickbaldwin.com/toc.htm[/url]

 John_Clark 02-11-2008 12:49 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

 DickBaldwin 02-11-2008 02:05 PM

[quote=John_Clark;4603][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[/quote]

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: [url]http://www.dickbaldwin.com/tocalice.htm[/url]
Free programming tutorials: [url]http://www.dickbaldwin.com/toc.htm[/url]

 John_Clark 02-12-2008 12:21 PM

1 Attachment(s)
[QUOTE=DickBaldwin;4604][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.

[/QUOTE]
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 09:01 AM

[quote=John_Clark;4613][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[/quote]

I ran the demo but I didn't see any straight lines. What am I missing?

Thanks,
Dick Baldwin
Free Alice tutorials: [url]http://www.dickbaldwin.com/tocalice.htm[/url]
Free programming tutorials: [url]http://www.dickbaldwin.com/toc.htm[/url]

 John_Clark 02-13-2008 01:14 PM

[QUOTE=DickBaldwin;4621][quote=John_Clark;4613]

I ran the demo but I didn't see any straight lines. What am I missing?

[/QUOTE]
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.

All times are GMT -5. The time now is 02:31 PM.