Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Clock (https://forums.graalonline.com/forums/showthread.php?t=44313)

Pokilty 04-17-2003 05:49 AM

Clock
 
1 Attachment(s)
I'm sure we were all excited when we created our first clock... this my first. I did it through trial and error w/o looking at any other sources. It's good cuz i just learned trig a few weeks ago so i can finally use the knowledge i just learned in something useful. thought i'd share my discovery with the world thou theres probably a million clocks out there already.

Chrisz 04-17-2003 03:08 PM

:eek: Thats not that bad.. but the numbers/hands are a little off :P I haven't ever tried anything like that.. O.o; and im a scripter.. o.O

Pokilty 04-17-2003 03:35 PM

Give me the exact value of pi and i'll give you the perfect clock. and also this isn't by far my best npc, it's just the first npc i made that involves showpoly and trig

AlexH 04-17-2003 03:37 PM

3.141592654

That's as far as my calculator goes.

Pokilty 04-17-2003 03:46 PM

Exact value of pi to the millionth digit:
http://www.ecst.csuchico.edu/~tchung/pi_val.html

Chrisz 04-17-2003 04:14 PM

Even if you didnt have the exact value its down to your x/y that you put.. its different from that of the clock hand

Pokilty 04-17-2003 04:27 PM

Quote:

Originally posted by Chrisz
Even if you didnt have the exact value its down to your x/y that you put.. its different from that of the clock hand
Yea you're probably right... but i'll be satisfied with what i did now considering i just started trig

osrs 04-17-2003 04:57 PM

Very nice Poki. =)
By the way,Jagen already made a nice clock too,do a forum search and you will see..

Spark910 04-17-2003 10:27 PM

Nice, make the text go a color when the min hand is on it (e.g: Green)

So we can quickly read the time due to the x/y error.

Python523 04-17-2003 10:35 PM

Quote:

Originally posted by Pokilty
Exact value of pi to the millionth digit:
http://www.ecst.csuchico.edu/~tchung/pi_val.html

millionths are
3.141592

Loriel 04-17-2003 11:11 PM

Quote:

Originally posted by Python523
millionths are
3.141592

Yes, those are millionths. But the millionth digit is far more off.

Python523 04-17-2003 11:16 PM

Quote:

Originally posted by Loriel

Yes, those are millionths. But the millionth digit is far more off.

when i saw that he say millionth i thought he said millionths *shrugs*

Pokilty 04-17-2003 11:22 PM

i mean 1 million digits after the decimal.

PrinceDark 04-18-2003 02:30 AM

Nice Clock.
The hour hand is missing though.

Projectshifter 04-18-2003 04:29 AM

Pretty impressive my friend :) Just make it compatible with Timevar and you've made something useful ;)
---Shifter

Pokilty 04-18-2003 05:02 AM

i did make it compatible with timevar, but it's already up on a server. also i left the hour hand out cuz it was just a quick test

HoudiniMan 04-18-2003 10:04 PM

Graal recognizes the value of "pi" as 3.14..whatever as far as i've seen, try using that?

draygin 04-18-2003 11:03 PM

Quote:

Originally posted by Pokilty
Exact value of pi to the millionth digit:
http://www.ecst.csuchico.edu/~tchung/pi_val.html

I think this one is bigger. x.x but I'm not sure its not done loading yet so I cant tell yet.

3.141592653589793238462643383279502884197169399375 105820974944592.jp/


grr it abbreviates the url
there just put http:// infront of 3.14 (with out www.) It's still going ;x way big..
ack its freezing up my internet explorer x.x maybe its actually caluclating it and not just some numbers some one put up... hmm.. will see if its going in an hour

adam 04-19-2003 06:29 AM

type "pi" in graal

it goes like all the digits graal supports....


... like houdiniman said..

Pokilty 04-19-2003 10:30 PM

oh great i didn't know that... thanks

osrs 04-20-2003 07:46 PM

Quote:

Originally posted by adam
type "pi" in graal

it goes like all the digits graal supports....


... like houdiniman said..

Honestly I know that for like 1 week O_o'...
I was always making a var to give a value to pi. (e.g PI=3.14..)

Pokilty 04-21-2003 05:44 AM

Me too every script I put pi=3.14. I haven't tried not putting that in before, I'll try it later when I have more time. I'm sure that they know what they're talking about though.

adam 04-21-2003 08:58 AM

1 Attachment(s)
Ok, after doing a little looking for pi I found a few methods to get it.

NPC Code:

PI = 4*( (4*arctan(1/5)) - arctan(1/239) );



I also tried to script Buffon's prabability method but it doesn't work too well.

GoZelda 04-24-2003 11:15 AM

Quote:

Originally posted by Pokilty
Exact value of pi to the millionth digit:
http://www.ecst.csuchico.edu/~tchung/pi_val.html

You'll get one heck of a laggy script if you're using that...
hey, isn't pi a set variable?

osrs 04-24-2003 08:36 PM

Quote:

Originally posted by adam
NPC Code:

PI = 4*( (4*arctan(1/5)) - arctan(1/239) );



Could you explain me how arctan works? x.x'

adam 04-24-2003 10:27 PM

Quote:

Originally posted by osrs


Could you explain me how arctan works? x.x'


It does what tangent does in reverse.

adam 04-24-2003 10:28 PM

Quote:

Originally posted by GoZelda

You'll get one heck of a laggy script if you're using that...
hey, isn't pi a set variable?


You only need to put it in to a certain number of decimal places, graal doen't support all that many... And pi is built in and already set to the number of decimal places graal supports. or cares about.

osrs 04-24-2003 10:32 PM

Quote:

Originally posted by adam
It does what tangent does in reverse.
so helpfull...¬_¬'

draygin 04-24-2003 11:42 PM

Quote:

Originally posted by osrs


so helpfull...¬_¬'

Tangent

Making contact at a single point or along a line; touching but not intersecting.
Irrelevant.

n.
A line, curve, or surface meeting another line, curve, or surface at a common point and sharing a common tangent line or tangent plane at that point.
Abbr. tan Mathematics. The trigonometric function of an acute angle in a right triangle that is the ratio of the length of the side opposite the angle to the length of the side adjacent to the angle.
A sudden digression or change of course: went off on a tangent during the courtroom argument.
Music. An upright pin in a keyboard instrument, especially in a clavichord, that rises to sound a string when a key is depressed and stops the string at a preset length to set the pitch.


--------------------------------------------------------------------------------
[Latin (lnea) tangns, tangent-, touching (line), present participle of tangere, to touch. See tag- in Indo-European Roots.]

I think this really helps just think of it as being the opposite of this.

HoudiniMan 04-25-2003 01:40 AM

is that the same as inverse tangent?

Pokilty 04-25-2003 06:45 AM

you lost me guys i was just testing out simple trig with my clock npc.

HoudiniMan 04-25-2003 09:30 AM

Quote:

Originally posted by Pokilty
you lost me guys i was just testing out simple trig with my clock npc.
We had some relevant questions to tack on :)


All times are GMT +2. The time now is 07:35 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.