View Full Version : E in 3d
amp
September 2nd, 2003, 02:54 PM
How do I change the "E" into a "G", "N", or "T"?
http://www.kirupa.com/lab/ein3d.htm
Voetsjoeba
September 2nd, 2003, 03:05 PM
I think this was my first question on this forum. http://www.kirupaforum.com/forums/showthread.php?s=&threadid=18241. I figured it out, this is how to do it. In the beginning, some coordinates are defined. You should draw those axes and draw out the E shape in those axes using the coordinates given. Then, using the same axes, create your own letter, and take the coordinates of each point. Then fill those in in the coordinates array in the code. This is how the coordinates are placed in the arrays:
arrayx - 1, 2, 3, 4, 5, 6, 7, 8
arrayy - 1, 2, 3, 4, 5, 6, 7, 8
amp
September 2nd, 2003, 04:13 PM
Umm... I'm really stupid, so stick with me here... should I draw dots to make a G or N and get the coordinates of those dots and put them in the AS?
Voetsjoeba
September 3rd, 2003, 06:51 AM
Yes. On a piece of paper, draw x and y axes and draw out an G or an N. But first, draw out the E using the coordinates given, that way you'll see how it is done for the E, and then you can create your own letter using the same system as the E.
amp
September 3rd, 2003, 01:18 PM
I suppose I could use a graphing calculator?
Voetsjoeba
September 3rd, 2003, 01:30 PM
Originally posted by amp
I suppose I could use a graphing calculator?
Err ... I have no idea :P I don't even know what a graphing calculator is lol :P
Voetsjoeba
September 3rd, 2003, 01:43 PM
I just noticed: in the code on the second frame there is a for loop that messes the shape up if you don't have the same amount of coordinates as the E has. Use the attached FLA to work from, I fixed the 'bug' and created a T for you to show how it works :)
senocular
September 3rd, 2003, 01:49 PM
no, that would only complicate things :sigh:
just sketch it out on paper, even better if you have graph paper. A G is no brain bender in terms of shape complexity, especially if you stick the the rigid hard corner feel of the current E. Just draw it out and figure points for each corner which are to be drawn to.
ex:
A-----------B
| |
| D--------C
| |
| | I-----J
| | | |
| | H--G |
| | | |
| E-----F |
| |
L-----------K
looking at this, you'll get points somewhere along the lines of:
A: 0,0
B: 8,0
C: 8,2
D: 2,2
E: 2,8
F: 6,8
G: 6,6
H: 4,6
I: 4,4
J: 8,4
K: 8,10
L: 0,10
Now Im sure these arent viable for the E in 3D file but you get the idea. Besides, what do you expect for an 2 minute ASCII G ;)
if you're still having problems, I can work in a similar example or rotating letters in the kirupa 3D tutorial.
and see Voetsjoeba 's file :)
amp
September 3rd, 2003, 07:02 PM
Thx guys! :beam:
Voetsjoeba
September 4th, 2003, 01:58 PM
Sen - You have to work from the origin of the axes. If not the letter will turn around a corner point, not the center point. This is how I made the T:
senocular
September 4th, 2003, 02:59 PM
I know :crazy:
Timage
September 5th, 2003, 06:11 AM
Is it possible to not have the shperical outline? If so, which part of the code would I remove?
senocular
September 5th, 2003, 09:17 AM
start pulling some numbers and find out :beam:
Timage
September 5th, 2003, 06:49 PM
Lol.:smirk:
senocular
September 5th, 2003, 08:06 PM
ok, Ill do a Letter addition to the 3D tutorial this weekend. If I start tonight, Ill use this post as a springboard, adding as I go along.
Voetsjoeba
September 6th, 2003, 02:01 AM
Did you manage to get rid of the globe lines ? ;)
Timage
September 6th, 2003, 04:34 AM
No.
:m:
Voetsjoeba
September 6th, 2003, 04:35 AM
Sen - Can I ? :beam:
Voetsjoeba
September 6th, 2003, 07:35 AM
Meh, I'll tell ya anyway :P Replace the code on the second frame with:
with (handles) {
clear();
lineStyle(0, 0x7799FF, 100);
fcos = Math.cos(FrameCount*0.77);
fsin = Math.sin(FrameCount*0.77);
gcos = Math.cos(FrameCount*0.34);
gsin = Math.sin(FrameCount*0.34);
for (t=0;t<Xcoords.length;t++)
{
x = Xcoords[t]*R0;
y = Ycoords[t]*R0;
z = 0;
lx=x;
ly=y*gcos-z*gsin;
lz=y*gsin+z*gcos;
tx=lx*fcos-lz*fsin;
ty=ly;
tz=((lx*fsin+lz*fcos)/Zweaken)+Zoffset;
if(t!=0)
lineTo((tx/tz)+Xoffset,(ty/tz)+Yoffset);
else
moveTo((tx/tz)+Xoffset,(ty/tz)+Yoffset);
}
x = Xcoords[0]*R0;
y = Ycoords[0]*R0;
z = 0;
lx=x;
ly=y*gcos-z*gsin;
lz=y*gsin+z*gcos;
tx=lx*fcos-lz*fsin;
ty=ly;
tz=((lx*fsin+lz*fcos)/Zweaken)+Zoffset;
lineTo((tx/tz)+Xoffset,(ty/tz)+Yoffset);
}
And bye-bye to the globelines ...
senocular
September 6th, 2003, 08:19 AM
Originally posted by Voetsjoeba
Sen - Can I ? :beam:
lol, of course! not that it matters now since you already did ;)
Voetsjoeba
September 6th, 2003, 08:46 AM
Lol, yeah, you said a couple posts ago -start pulling some numbers and find out- So I thought you wanted him to find out by himself ... so I wasn't sure if I was to tell him what to do ... But yeah doesn't matter anymore now :P
senocular
September 6th, 2003, 09:14 AM
I guess everyone can't be expected to do everything themselves :-\
... unless you're a mod, then you expect that. And when it doesn't happen, you start banning people :bad:
Voetsjoeba
September 6th, 2003, 09:26 AM
Eep !
TAPTAPTAPTAPTAPTAPTAPTAPTAP TAPTAPTAP
TAPTAPTAPTAPTAPTAP
TAPTAPTAPTAPTAPTAP
... *whew, I'm safe here* :P
senocular
September 13th, 2003, 06:06 PM
ok, I didnt write anything for these (asside from comments) but here are some letter/number on screen examples.
Heres a working online version of one.
http://www.umbc.edu/interactive/examples/3d/3Dcounter.html
Note there may be some variable differences here in comparison to the tutorial, but I think you can get the gist.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.