r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Rebol School] Rebol School

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
[1860x3]
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."
Taking some time to read and understand the chapter, I would guess, 
it wouldn't be too hard to construct an algorithm, that did the job.
kib2
8-Feb-2009
[1863]
Geomol: interesting....
Steeve
8-Feb-2009
[1864]
what i don't understand, is your need to fulfill intersection points 
to postcript format, can't you send just an image of your drawnings 
?
Geomol
8-Feb-2009
[1865]
Just realized, David H. Eberly is also the author of a book called 
"3D Game Engine Design". I should get this.
Anton
8-Feb-2009
[1866]
Just googling, this page seems to have good methods in it:
http://www.groupsrv.com/computers/about179364.html
Geomol
8-Feb-2009
[1867]
Game developers have solved many such problems, and often in efficient 
ways (games like performance). Intersections with Bezier curves are 
discussed here:
http://www.gamedev.net/community/forums/topic.asp?topic_id=385751
kib2
8-Feb-2009
[1868]
Steeve :  the purpose is to create a geometrical drawing dialect. 
Maybe I'll have a line (AB) that intersects an ellipsis and I wanted 
to use the intersection points
Steeve
8-Feb-2009
[1869]
with Rebol ?
Anton
8-Feb-2009
[1870]
*ding! did you mean Ellipse ?
kib2
8-Feb-2009
[1871x2]
Anton: yes, sorry :)
Steeve: why not ?
Anton
8-Feb-2009
[1873]
Why didn't you say so ? :)
Geomol
8-Feb-2009
[1874]
lol
Anton
8-Feb-2009
[1875]
.. because this is where I step in:

http://anton.wildit.net.au/rebol/gfx/demo-intersection-points-of-line-and-ellipse.r

http://anton.wildit.net.au/rebol/gfx/demo-intersection-points-of-line-and-circle.r
Steeve
8-Feb-2009
[1876]
Kib as i stated previously, if you don't need of the exact coordinates 
then you should use boolean operators of the graphic engine to find 
the intersection points (using colors clash), no need of math operations 
in that case.
Geomol
8-Feb-2009
[1877x2]
LOL again! I was just about to say:


ah, intersection of a line and an ellipse, then you just have to 
go to Anton's library.
Anton, that's a really cool demo with the line and ellipse!
Anton
8-Feb-2009
[1879]
Thanks, have you not already seen it, though ?
Geomol
8-Feb-2009
[1880x2]
I think, I saw it the first time. It's just really cool! :-)
And I can move the ellipse and endpoints of line around. Cool!
Anton
8-Feb-2009
[1882]
Note: I did not solve the "nearest point on an ellipse to a given 
point" problem yet, which is hard, so the auto-selection of nearest 
control point is not perfect.