World: r3wp
[Rebol School] Rebol School
older newer | first last |
Geomol 8-Feb-2009 [1812] | http://www.fys.ku.dk/~niclasen/rebol/libs/math/complex.r Just a little start, and no documentation, so you have to read the code to figure it out. |
Steeve 8-Feb-2009 [1813] | is there something in Rebol.org also ? |
kib2 8-Feb-2009 [1814x2] | Geomol: thanks, no problem for the doc. Reading your code is the same. |
Geomol: are you the author of the postscript dialect ? | |
Geomol 8-Feb-2009 [1816] | yes |
kib2 8-Feb-2009 [1817x2] | whao... |
So i have a difficult question : how do you handle intersection(s) between two paths ? | |
Anton 8-Feb-2009 [1819x2] | kib2: Note well. either 0 [true][false] ;== true either 1 [true][false] ;== true |
hence: either (modulo malong 2) [true][false] ; == true, always... | |
Geomol 8-Feb-2009 [1821] | kib, :-D Do you expect me to remember, how postscript works. ;-) I have to think a bit now ... |
Steeve 8-Feb-2009 [1822] | ahah |
Geomol 8-Feb-2009 [1823] | kib, I think, I remember the concept of paths in postscript. Can you give an example of such an intersection? |
Steeve 8-Feb-2009 [1824] | you're like me Geomol, after some months, my memory is garbage collected |
Geomol 8-Feb-2009 [1825x2] | LOL yes |
I try to remember the really important things, the rest just hit the bin. | |
Anton 8-Feb-2009 [1827x2] | kib2: you can write: either (1 = modulo malong 2) [true][false] |
In rebol, 0 is equivalent to true, not to false (as in many other languages). | |
Steeve 8-Feb-2009 [1829x2] | Geomol if your memory works like mine, you only remember process and structures not contents |
you remember abstract shapes, not data | |
Geomol 8-Feb-2009 [1831x2] | well, I also remember data. I try to remember the important data. |
like the greek alphabet. Doh! ;-) | |
Steeve 8-Feb-2009 [1833] | all is data but the most important ones are data which build other data (rules) like in an inference engine |
Geomol 8-Feb-2009 [1834] | yes |
kib2 8-Feb-2009 [1835] | Geomol: sorry, ....baby crying |
Geomol 8-Feb-2009 [1836x2] | Better to remember where do look something up, than to remember all that is in the book. |
kib, np | |
Steeve 8-Feb-2009 [1838] | exactly |
kib2 8-Feb-2009 [1839] | i meant ie is there something for computing intersection between a line and a bezier path ? |
Steeve 8-Feb-2009 [1840] | better to know how to use a search engine (like google) instead of trying to remember all the url ;-) |
Geomol 8-Feb-2009 [1841x2] | kib, no there isn't much graphic routines in postscript, just box, boxfill, image and line: http://www.fys.ku.dk/~niclasen/postscript/postscript.html |
I have to check the original PostScript documentation to say, if those things are part of the definition of PS. | |
Anton 8-Feb-2009 [1843] | kib2, you mean intersection(s)* between a line and a bezier path. |
kib2 8-Feb-2009 [1844] | Anton: yes, I've forgotten the (s) |
Anton 8-Feb-2009 [1845] | It must be a fairly complex algorithm.. |
kib2 8-Feb-2009 [1846] | Anton: yes, that's why I was asking if someone else already wrote something like that. Computing such things much be a real headache ! |
Steeve 8-Feb-2009 [1847x2] | if i had to do, i will use the draw engine with logical bitmap operators to find the points |
it would be not really accurate but it would work | |
Geomol 8-Feb-2009 [1849] | kib, I took a look at the PS documentation, and it has arcs, curves, etc. This isn't implemented in the REBOL ps dialect (yet). My dialect was just make fast to get some useful postscript out from REBOL. I have a book on computer graphics, that might deal with the problem, you describe. I take a look ... |
kib2 8-Feb-2009 [1850] | Geomol: thanks. Are you also the author of the PDF dialect ? |
Geomol 8-Feb-2009 [1851] | no, that's Gabriele, I think. |
Anton 8-Feb-2009 [1852x2] | Gabriele is author of pdf-maker, yes. |
I would not rest until I had computed the exact intersection(s) of line and bezier curve ! :) | |
Geomol 8-Feb-2009 [1854x2] | Let's see, chapter 7, "Intersection in 2D". "7.3 Linear Components and Quadratic Curves", "7.4 Linear Components and Polynomial Curves". Hmm |
Bezier curves are polynomial curves, so I guess that chapter 7.4 has the answer. | |
Steeve 8-Feb-2009 [1856] | you should be well informed, it's a dark matter |
Geomol 8-Feb-2009 [1857x2] | The book is called "Geometric Tools for Computer Graphics" by Philip J. Schneider and David H. Eberly. |
:-) | |
kib2 8-Feb-2009 [1859] | Geomol: Worth a look ? |
Geomol 8-Feb-2009 [1860x2] | I think, it's an excellent book. I read about it on the web long ago, people discussing different books dealing with geometrical problems in computer graphics. I bought it back then and have used it often since. |
Chapter 7.4 starts with "This section discusses how to compute points of intersection between the line and curve from both an algebraic and geometric perspective." | |
older newer | first last |