New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing some files #1
Comments
I've not put the indicated header files, because they contain other functionalities, and are not directly relevant to the algorithm. However, it should be a trivial task to add the missing classes for building the code. |
It would be terrific to see the entire code for the app you made as example code, but this is wonderful thanks a lot! From: x-w notifications@github.com I've not put the indicated header files, because they contain other functionalities, and are not directly relevant to the algorithm. |
Cracking code, @x-w , but adding svPrefix.h and svMath.h is proving to be more difficult than expected. If you could add them to the repository, or even post them somewhere else for reference, I would be very appreciative. Thanks in advance. |
Can you clarify the equalWithEps method and Point class ? Does the Point class holds phi theta position (calculated cartesian) Great pice of code! |
I uploaded svMath.h to github. Just take it as a reference.
|
Hello it’s been a while since this email.
I’ve been trying (again) to make this work!
I was able to compile and run your code generating some successful results.
The problems happens with large number of points (totally random usually above 1000) and generation will fail on the assertion bellow when cleaning up the middle vertices:
void SphericalVoronoiCore::cleanupMiddleVertices()
{
using namespace std;
SV_DEBUG(cout << "cleanupMiddleVertices" << endl);
std::vector<vertex_ptr> deleteVertices;
std::vector<half_edge_ptr> deleteHalfEdges;
for (auto& v0 : vertices)
{
if (v0->cells.size() == 2)
{
assert(v0->halfEdges.size() == 2); // <— RIGHT HERE
auto v1 = v0->halfEdges[0]->end;
auto v2 = v0->halfEdges[1]->end;
auto newEdge = make_shared<half_edge>(v1, v2);
v1->halfEdges.push_back(newEdge);
halfEdges.push_back(newEdge);
deleteVertices.push_back(v0);
deleteHalfEdges.push_back(v0->halfEdges[0]);
deleteHalfEdges.push_back(v0->halfEdges[1]);
}
}
With a small number of points , usually the problem doesn’t happen. I think is because with the small set, the chances of the problem to occur is much lower.
Can you share any part of your code that generates your random points?
You mentioned dividing the points on a projected spherical cube.
Are you aware of problems (besides a bad distribution of points) that might arise from totally random number os points instead of a mor distributed set?
All the best and thank you in advance
Affonso
… On Dec 7, 2015, at 12:02 AM, x-w ***@***.***> wrote:
I uploaded svMath.h to github. Just take it as a reference.
> On Dec 6, 2015, at 4:14 PM, affonsoloyola ***@***.***> wrote:
>
> Can you clarify the equalWithEps method and Point class ?
>
> Does the Point class holds phi theta position (calculated cartesian)
>
> Great pice of code!
>
> —
> Reply to this email directly or view it on GitHub <#1 (comment)>.
>
—
Reply to this email directly or view it on GitHub <#1 (comment)>.
|
I don't think there were many things special when generating the random points. Have you pre-filtered your random points to remove duplicated ones (and the ones which are too close)? However, I haven't tried to use it on >1000 initial points. There could be bugs with a large dataset, which I am not aware. |
Thank you for your reply. It is working! It was (of course) my fault. ;)
I’ve eliminated the glm headers on the first try to make it independent of gl.
It worked for most cases. So I assumed that it was working. But in fact it wasn’t.
Replacing the glm code created some king floating precision issue somewhere I couldn’t spot.
I’ve added glm to my software and used your code as-is and it works fine!
Sorry false alarm.
Great implementation! Although I love math, I can’t say it is one of my best skills. I’m a very good software writer on other areas.
Once again,
Thank you.
Affonso
ps, If you don’t mind sharing the code for the projected cube with the regions etc I would predicate a lot. Math is not really one of my best skills.
… On Apr 3, 2017, at 10:36 AM, xw0 ***@***.***> wrote:
I don't think there were many things special when generating the random points. Have you pre-filtered your random points to remove duplicated ones (and the ones which are too close)?
However, I haven't tried to use it on >1000 initial points. There could be bugs with a large dataset, which I am not aware.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#1 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/APbqVo2g7kXM4oq7F8ZBeci8et-w00Kgks5rsQPRgaJpZM4CzpRn>.
|
That's good to know! Unfortunately, the mentioned code stays on a computer which I rarely use now. I'll check it later when I get a chance. |
svprefix.h, svmath.h both missing
The text was updated successfully, but these errors were encountered: