World: r3wp
[!REBOL3-OLD1]
older newer | first last |
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 [440x11] | 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. | |
maybe M * T for cross-product, and M . T for dot-product? | |
Would it be strange to have dots flying around in the code, all by themselves? | |
Reaching second element on second row in a 2-dimensional matrix: M/2x2 | |
And of course we should have matrices with more than 2 dimensions, so something like this is possible: M/2x2x2 So pairs need to be extended somehow into a datatype, which is like a vector, but with integers instead of decimals. | |
/joke-mode-on Sorry guys, REBOL 3.0 is delayed another year! ;-) /joke-mode-off | |
Karol 11-Apr-2006 [451] | Hi! Why use pairs for idexing thats what paths are for. What is wrong with M/2/2/2 ? |
Pekr 11-Apr-2006 [452x2] | we should stay with path imo ... |
although we got overvoted for rebcode, which uses dot ;-) | |
Karol 11-Apr-2006 [454] | since pairs are only integers not decimals vector and matrix could be replacement for draw dialect coordinates, AGG has subpixel accuracy |
Rebolek 11-Apr-2006 [455] | Karol: You can do 2x2 with pair! but not 2/2 with path! |
Karol 11-Apr-2006 [456] | like this: a: [ [ 0 1] [ 2.2 3.1]] a/2/1 |
Rebolek 11-Apr-2006 [457] | Geomol: "So pairs need to be extended somehow into a datatype, which is like a vector, but with integers instead of decimals." --- decimal! is better in my opinion. It's consistent with current behaviour whre you can do >> block/4.5 and decimal part is truncated. |
Karol 11-Apr-2006 [458x2] | but with matrix we can a: make matrix! [ [ 0 1] [ 2.2 3.1]] a/2/1 |
if pair will be extended it overloads 16 byte limit for slot and become a series datatype, something complety different. there can be only 10 bytes per value ( I don't know exacly but tuples can have only 10 bytes not more) | |
Henrik 11-Apr-2006 [460x3] | during a bath, I thought up a Grand Master Plan: 1. Build a dialect that could handle scientific/symbolic math on the hard core level 2. Make it possible to take an equation and draw it up correctly with DRAW, a pretty print equation display. The same dialect would be used as above. 3. Use that to display pretty equations inline in makedoc2/3 documents! 4. Some people are working on a postscript dialect which hopefully eventually will be able to use DRAW blocks as an input, thereby allowing you to create equations on the console and convert it to DRAW or PS at the same time as having the ability to do calculations. That would be powerful. Say: calculate [2 [m] / 3 [cm]] ; would return the result as needed calculate/draw [2 [m] / 3 [cm]] ; would return a DRAW block postscript calculate/draw [2 [m] / 3 [cm]] ; would convert that DRAW block to postscript |
now there is just the problem of doing symbolic math in such a block. you'd need specific functions for that, I think. | |
this is probably something that is best suited in another group... | |
Geomol 11-Apr-2006 [463] | Karol, I think, you're right. Path is ok with matrices too. M/2/2/2 means the same as M/2x2x2, so no need for this new way. |
older newer | first last |