CGAL::Polyhedron_3 demo - failing intersection - intersection

I started using CGAL demos to find the intersection of two polyhedra. I met a problem when the two polyhedra share some vertices and edges. The program extis with "Segmentation fault" call. I assume the problem refers to the shared vertices, since for other case I see no problem. My polyhedra are e.g. rhombic triacontahedra or truncated tiracontahedra (the latter are concave). Is it a problem of demo program or the CGAL algorithm itself?
Input OFF files I use:
https://www.dropbox.com/s/nywdv80yzr0wpxp/henley_3D.off
https://www.dropbox.com/s/slxzfwhchpuix2p/henley_shift_3D.off
I'm using CGAL with Ubuntu 10.04 under VirtualMachine with Win7 x64 as host.
I will be grateful for any help from you.
Best,
Radek

First problem, your polyhedra are inconsistently oriented (which explain the checkerboard coloration when you open them in the demo.
Second problem you have non triangular facets which would not
be a problem for Nef if the vertices of the facets were coplanar
(which is not the case).
To fix this you can use the "Orient polygon soup" plugin and "Inside outside" plugin to fix the orientation.
The plugin "Triangulated facets" will help before creating nef polyhedra.

Related

Does the implementation of Eigen depend on standard containers?

Eigen is an awesome algebra/matrix computation c++ library and I'm using it in a developing project. But someone told me not to use it because it depends on standard containers, which is doubtful to me. The reason not to use standard containers is complicated and we just ignore it for now. My question is, does eigen's implementation really depends on the standard containers? I've searched on the Eigen homepage but nothing found. Can anyone help me?
I would rather say no as there are only two very marginal use:
The first one is in IncompleteCholesky where std::vector and std::list are used to hold some temporary objects during the computation, not as member. This class is only used if a user explicitly uses it.
The second one is in SuperLUSupport module, which is a module to support a third library. Again, you cannot use accidentally!
The StlSupport module mentioned by Avi is just a helper module to ease the storage of Eigen's matrices within STL containers.
Yes, but a very little bit. You may not even need those parts, depending on your precise use. You can run a quick grep to see exactly what std:: containers are used and where. In 3.3.0, there is a std::vector member as well as a std::list<>::iterator in ./src/IterativeLinearSolvers/IncompleteCholesky.h, std::vectors are typically used as input for sparse matrices (SparseMatrix::setFromTriplets, although it really needs the iterators).
There is also the ./src/StlSupport/ directory, but I'm not sure that's what you don't want.

3-dim putty (ssh)

Imagine a 3-dim putty - a polyhedron which every facet is a putty shell.
A few Qs:
1. Is there already such a thing?
2. How can I easily implement a cube/polyhedron that rotates freely, so that on each facet - I can decide what to show (for example, a putty shell). I really don't want to dwell on the graphics part, unless I have to. So any easily prepared graphic would be nice, as long as it supports my requirement. Can openGL help me? JOGL? HTML5? (I don't mind it being in a browser)
Really weird question, not even sure it belongs here, but seems fun anyway...
Have a look here : http://www.jukie.net/bart/blog/popenRWE
So I'd say : start a bash instance with this variant of popen which handles both writes and reads, use the pipes for input and output, forward keyboard strokes to input, and render the output in OpenGL, probably in a rendertexture.
Repeat for each side...
Not html5 or jogl, though. Plain old C or C++.
Compiz's Desktop Cube and six fullscreen Xterms.

What is the indexBuffer, and what might cause me to run out of them?

I am making a flash game using Flare3D and when i load a new scene it give me this error:
Error: Error #3691: Resource limit for this resource type exceeded.
at flash.display3D::Context3D/createIndexBuffer()
at flare.core::Surface3D/upload()[Z:\projects\flare3d 2\src\flare\core\Surface3D.as:237]
at flare.core::Mesh3D/upload()[Z:\projects\flare3d 2\src\flare\core\Mesh3D.as:130]
at flare.core::Mesh3D/draw()[Z:\projects\flare3d 2\src\flare\core\Mesh3D.as:335]
at flare.basic::Scene3D/render()[Z:\projects\flare3d 2\src\flare\basic\Scene3D.as:593]
at flare.basic::Scene3D/enterFrameEvent()[Z:\projects\flare3d 2\src\flare\basic\Scene3D.as:461]
I am guessing from the error that it is running of something, but I don't know what the Context3D.createIndexBuffer() does. Since flare3D is not open source I can't dig in for any clues there.
So i want to know: what is teh Context3D IndexBuffer, and what might make me run out of that resource type?
And please don't just link to the ASDocs for those classes, I have looked and they do not answer this question.
I could be wrong, but I'm guessing they are talking about the same Index Buffers that are used in OpenGL and DirectX. They are arrays of integers that are indices into a vertex array so that when drawing multiple polygons that share vertices, you don't have to specify the entire vertex every time.
This is a relatively good explanation:
http://openglbook.com/the-book/chapter-3-index-buffer-objects-and-primitive-types/#toc-enter-index-buffers
I don't know anything about Flare3D, but is it possible that your scene has too many complex meshes and is running out of memory for index buffers?

Castle.TypedFactory.DefaultInterfaceFactoryComponentSelector could not be resolved

I am following example by José F. Romaniello on session management with NHibernate. It's a very good article, however I'm struggling with it having very little experience with NHibernate, Windsor and MVC.
I am trying to re-create NHibernateInstaller, however encountering the following error: Component Castle.TypedFactory.DefaultInterfaceFactoryComponentSelector could not be resolved. Make sure you didn't misspell the name, and that component is registered.
In the sample project provided this error does not crop up, even though the installer is identical and Google does not come up with any results (which is very unusual). What causes this and how can it be avoided?
it seems a problem with the TypedFactoryFacility... are you doing this?
kernel.AddFacility<TypedFactoryFacility>();
before running all the installers?
uncomment the following code in Bootstrapper.cs file.
container.AddFacility();
This happened to me when I created my own implementation of ITypedFactoryComponentSelector, but forgot to register the selector itself.
There was no indication this was the actual problem (and the kernel debug information assured me the components can be resolved) - but registering it fixed the issue.
Hope this helps someone :-)

Runtime Class creation in actionscript-why and for what purpose?

Hi
Recently in actionscript it has been made possible to create Classes at runtime. Thi seems quite cool, but I am perplexed thinking of a situation in which this might be useful. Anyone have any ideas?
First of all, the uses for this in ActionScript is limited. So start of understanding what it actually is, and how other languages use it.
See Self-modifying code on wiki:
http://en.m.wikipedia.org/wiki/Self-modifying_code
Also see Reflection:
http://en.m.wikipedia.org/wiki/Reflection_(computer_science)
As an example of how it might be useful, I'm currently working with genetic algorithms to modify code at runtime. This way I can test every permutation (varying initial values and methods) without having to create classes for them, with the added bonus of exporting a .swf only containing the winning permutation.