-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[GUI] Fix issue with triangles not showing up when they are drawn clockwisely #1321
[GUI] Fix issue with triangles not showing up when they are drawn clockwisely #1321
Conversation
@Eydcao proposed that, it can also be implented by barycentric coordinate. Also a good solution! |
Codecov Report
@@ Coverage Diff @@
## master #1321 +/- ##
==========================================
- Coverage 85.76% 85.35% -0.41%
==========================================
Files 18 19 +1
Lines 3294 3374 +80
Branches 624 630 +6
==========================================
+ Hits 2825 2880 +55
- Misses 343 362 +19
- Partials 126 132 +6
Continue to review full report at Codecov.
|
Co-authored-by: 彭于斌 <[email protected]>
Thanks~ I was in a meeting just now. I have reviewed your code and find the solution good enough. It turns out it does not matter whether the cross product is positive or negative (or say the particle is at the left side or the right side of the edge), as long as the it is at the same side for all edges, it can only be inside. So this is good enough already. Good fix! |
Thanks! You gave such a clear explanation.
So let's see whether there is something more we can improve on in this
issue...
Yadi Cao <[email protected]> 于2020年6月25日周四 上午12:18写道:
… @Eydcao <https://github.com/Eydcao> proposed that, it can also be
implented by barycentric coordinate. Also a good solution!
Thanks~ I was in a meeting just now. I have reviewed your code and find
the solution good enough. It turns out it does not matter whether the cross
product is positive or negative (or say the particle is at the left side or
the right side of the edge), as long as the it is *at the same side* for
all edges, it can only be inside.
So this is good enough already. Good fix!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1321 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEAYDGTF5VWPDR5L6VU6GDTRYIRNXANCNFSM4OGSEB2Q>
.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Originally I designed the API to ignore clock-wise triangles, but since it is confusing the users, let's just take your proposal.
…ckwisely (taichi-dev#1321) Co-authored-by: 彭于斌 <[email protected]>
Hi all,
One of our classmate in GAMES201 from Wechat found that ONLY when [va, vb, vc] is in counterclockwise order can
ti.gui.triangle(va, vb, vc)
manage to display it. If the offered vertices are in clockwise, ourti.GUI
simply ignore it.For example, if I say
This triangle won't be drawn.
If it is a designed feature, maybe we can try to doc it?
If not, here is one possible solution.
HDYT? Maybe we can have a better solution.