Code Comments
Programming Forum and web based access to our favorite programming groups.Hi, I think I already ask this question in the past but I cannot convince myself that it remains without answer. I create eps images with Matlab (let's say bar3 diagrams for instance) for which most of the bars are behind other bars. For some reason, the eps format keeps everything as does the pdf format in case of conversion of such diagrams. Is there a way to remove all the information in the original eps file that is not necessary for visualization. Thank you, M.
Post Follow-up to this messageIn article <a51778e6-4fe3-4375-aef7-b1806c36368d@a22g2000hsc.googlegroups.com>, pluton <plutonesque@gmail.com> wrote: ... > Is there a way to remove all the information in the original > eps file that is not necessary for visualization. No, not easily and not using solely Postscript. I am not a Matlab user, but what you describe reminds me of 3D rendering using the "painter algorithm" (that is, the scene is broken down into surface elements and those are ordered from furthest to closest to the viewer, projected on a plane and then their 2D projection filled). If the rendering primitives already provide polygon-filling (like Postscript or PDF), this is easy to implement, works reasonably well for non-intersecting convex polyhedras and so is probably good enough for rendering 3D bar charts. Of course, as you noted, this is wasteful, since fully hidden surface will be projected and painted, only to be overwritten by other projected surfaces... What you are asking for is called "hidden surface removal" (HSR). This is a lot harder to achieve and harder to explain : http://en.wikipedia.org/wiki/Hidden...e_determination For HSR to work, it must be done by the tier that has knowledge of the 3D objects, (Matlab in this case). Attempting to do it at the (final) 2D drawing is too late. Hence your question is a Matlab question, not a Postscript question. ________________________________________ ________________ François Robert
Post Follow-up to this messageThank you, I know a software that performs this kind of operation : DeepExploration. It works pretty well for Finite Element Meshes fro instance but I am not sure if it can handle colors or not. Anyway, its possible inputs are vrml or equivalent 3D formats and the process from matlab is not very easy to implement. As you mentionned, maybe I should ask Matlab for an improvment of their tool in that direction. Pluton
Post Follow-up to this messageOn 31 Mrz., 17:37, pluton <plutones...@gmail.com> wrote: > > I think I already ask this question in the past but I cannot convince > myself that it remains without answer. The old thread is here: http://groups.google.com/group/comp...e7b47e66f5ef784
Post Follow-up to this message> The old thread is here:http://groups.google.com/group/comp... /thr... thank you. The thing is that what I mentionned in this thread is not what I want anymore. When I consider matlab objects to be saved in eps format (as real vector object and not raster images embedded in eps files), they are just either : surfaces constructed with triangles (with a unique color per triangle), or 3D bars or patches. I do not think it is a very difficult task in this situation to calculate which object belongs to the foreground. Anyway, it looks like it is a matlab task more than an .eps task. I'll send mathworks an email to ask them what they think.... Thank you, Pluton
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.