World: r3wp
[!REBOL3-OLD1]
older newer | first last |
Henrik 11-Apr-2006 [396x3] | or rambo? |
geomol, I once had the idea that you could define ISO units as kind of datatypes and do scientific calculations on them | |
my calculator can do that, so why not have it in rebol? | |
Geomol 11-Apr-2006 [399] | Henrik, give an example! |
Graham 11-Apr-2006 [400] | Geomol, Rambo the suggestion for a vector datatype. |
Rebolek 11-Apr-2006 [401] | and what about interval computations? :) |
Graham 11-Apr-2006 [402] | Let's stick with 3 dimensions. |
Henrik 11-Apr-2006 [403x2] | well, I'm really not sure about the notation as I haven't given it too much thought, so I can't give a valid example, but if you could say: >> 6 / 2 == 3 >> 6 [m] / 2 [cm] == 300 [cm] |
this is no good, but some method to attach units to numbers and variables and make REBOL aware of them during calculations | |
Graham 11-Apr-2006 [405] | >> $5.00 / 20 == $0.25 |
Geomol 11-Apr-2006 [406] | Henrik, ah ok. Yes, good idea! |
Graham 11-Apr-2006 [407] | so we can do mixed imperial and si calculations ?? |
Geomol 11-Apr-2006 [408] | Something like: ISOm6 / ISOcm2 |
Henrik 11-Apr-2006 [409x3] | sure, my HP48 can do that easily |
as long there is some definable way to convert between them or make some sense from it | |
the acceleration of gravity would be 9.82 [m/s/s] so units themselves are math expressions | |
PeterWood 11-Apr-2006 [412] | It that something for a dialect rather then to be inlcuded in the core langauge? |
Henrik 11-Apr-2006 [413] | peterwood, quite possibly |
Graham 11-Apr-2006 [414x2] | we already have money datatypes |
why not ones for mensuration | |
Henrik 11-Apr-2006 [416] | I think it's worth making a concept dialect for scientific math with units |
Geomol 11-Apr-2006 [417] | Hmm, funny idea. To add 6 meters and 2 UK foot: SIm6 + UKfoot2 Looks weird. :-) |
Henrik 11-Apr-2006 [418] | actually, it would be good to make a ctx-unit to handle units exactly like the hp48 does |
Graham 11-Apr-2006 [419] | I often have to calculate BMIs .. and most people know their height in feet and inches, but their weight in kgs :( |
Henrik 11-Apr-2006 [420x3] | the hp48 uses an underscore to attach the number to a unit: 6_m / 23_cm |
http://www.apple.com/downloads/macosx/math_science/eurekalc.html <-- I think that could be done with a dialect... | |
so many things to do! | |
Graham 11-Apr-2006 [423] | that calculator needs a spell checker as well! |
Henrik 11-Apr-2006 [424] | well, kintetic energy is that new thing, you know... |
Geomol 11-Apr-2006 [425] | Graham, I've made a RAMBO proposal for vector and matrix. |
Graham 11-Apr-2006 [426x2] | how do you find the 4th part of a 4D vector? |
ie. what comes after /z ? | |
Geomol 11-Apr-2006 [428x2] | 4? :) |
x, y and z can be possible, like we have first, second ... To reach the next dimensions, integers are needed. v: 1.0x2.0x3.0x4.0x5.0 v/x 1.0 v/5 5.0 | |
PeterWood 11-Apr-2006 [430] | A quick google took me to the Python page - "The 4th component can be accessed either by the name w or t." http://cgkit.sourceforge.net/doc2/vec4.html |
Geomol 11-Apr-2006 [431] | First, second, ... go up to tenth. We don't have eleventh. You need to do serie/11 to get the 11'th element. |
PeterWood 11-Apr-2006 [432] | It would seem w is the popular choice - www.mathpages.com/home/kmath482.htm |
Geomol 11-Apr-2006 [433] | Peter, ok idea, and I'm all for that. There just shouldn't be a limit, and we have to use integers to reach later parts of a vector ... like with series. |
Graham 11-Apr-2006 [434x2] | Good to know that is solved. |
don't know why we just don't start with "a" and work our way thru to "z" | |
PeterWood 11-Apr-2006 [436] | There also seems to be a convention of x y z t u v |
Geomol 11-Apr-2006 [437x2] | We run out of characters giving meaning, if we have for example an 8-dimensional vector. But it should be possible to make an 8-dimensional vector. |
t, u and v is probably found a lot in 3D graphics math. | |
PeterWood 11-Apr-2006 [439] | I'm sure that there is a mathematical convention and would be surprised if Carl S doesn't know it. |
Geomol 11-Apr-2006 [440x6] | t for translation. u and v is used as uv-mapping of textures. |
I don't even think, it'll take up much code to implement these things. The theory is there, and it's well-defined, how you calculate with vectors and matrices. | |
All different kinds of 3D manipulation will look simple, like scaling, rotation, reflection, etc. All those are well-defined matrix-operations. And supporting multi-dimensional vectors and matrices might pull a lot of science people to REBOL. | |
We need some different symbols for multiplication. dot-product, cross-product. | |
M: make matrix! 4x4 T: make matrix! 4x4 maybe: M x T :-) | |
but x might be a word. | |
older newer | first last |