Week 4 - First Evaluations

hecris
Published: 06/24/2019

Hello! This is my check-in for week 4, right before the first student evaluations. In the past month, I have implemented parabola-into-box and parabola-into-inverse sphere with the help of my mentors. Recently, I attempted box-into-capsule, but after discussion with my mentor, we decided that I would skip ahead to implementing the Heightfield class. I hope to revisit box-into-capsule, perhaps during the "code-break" week, to nail it down. In the meantime (starting week 5) I will begin implementing the Heightfield MVP: being able to construct it using a PNMImage, visualizing it, and an intersection test with an infinite line. Check back next week for more updates!

View Blog Post

Week 3 Check-In

hecris
Published: 06/22/2019

Hello again! Sorry for the late post, I have fallen behind in schedule (I will talk about that later) but nevertheless this post will act as my Week 3 check-in. Let's start with the good news! Last week, I submitted my parabola into inverse sphere collision test. After reviewing with my mentors, I realized that the surface point and surface normal were a little inaccurate. With the help of my mentors, I spent a little bit of week 3 fixing the surface point and normal and now my collision test is merged!

For week 3, my primary objective was to implement a box into capsule collision test, and it is still quite the challenge. There were many approaches that I tried but none of them were sufficient. The approach that I decided to stick with was to represent the capsule as 3 parts: 2 hemispheres and a cylinder. My initial attempt was naive; I tried to convert the box into the capsule's coordinate space, and test the box for intersection with the cylinder. However, I realized that it was difficult to test for intersection when the box was in the capsule's coordinate space. Instead, I converted the capsule into the box's coordinate space, and proceeded to find the nearest point on the box to the capsule's center. After, I convert this point to the capsule's coordinate space where it's aligned with the y axis, and do a cylinder test. This method seemed to work, and after finalizing it I sent in a pull request to the main repository.

After some discussion with my mentors, I realized that finding the point on the box closest to the capsule's center was not reliable. This is because the point closest to the center is not necessarily the point that is intersecting with the capsule, especially when the capsule is slanted to an angle! There is also some discussion on which part of the cylinder should be tested first. Currently, the cylinder part of the capsule is checked first and the endcaps second. 

This week (week 4), I was supposed to start implementing the Heightfield class. This consists of being able to construct it using a PNMImage and an line intersection test. As you can see, I am still caught up in box into cylinder but I am determined to nail it down. However, if I continue to struggle with it, then I might have to postpone the capsule test perhaps until the "code-break" week and begin the Heightfield test. I still have hope that I can take the remaining weekend to finish box into capsule. I will update you on how it goes!

View Blog Post

Week 2 Check-In

hecris
Published: 06/09/2019

This second week has been quite busy. Last week, I proposed a simple algorithm for Parabola into Box: iterate through the six planes of the Box and test for intersection with the parabola. Turns out, this algorithm was a bit too simple. After discussion with my mentors, I realized that the intersection point has to be behind all other planes of the box for a collision to exist. I spent a good part of Week 2 fixing my algorithm. One obstacle I came across was that at the corner of the box, it did not seem to pass my collision test. After talking to my mentors, I realized that it was only a matter of perspective. By using a different lens I confirmed that it was working correctly. After updating my pull request the algorithm is now merged!

For the second half of Week 2, I worked on Parabola into Inverse Sphere. As usual, I started off by writing some unit tests. This time, I made a test program (based off of my mentor's) to visualize the parabola and inverse sphere. I implemented the following algorithm: recursively subdivide the parabola into "close-enough" line segments, and test their intersection with the sphere. After passing all tests and appearing to be correct using the visualizer, I submitted a pull request for discussion and review.

Next week, I am scheduled to work on Box into Capsule detection. However, I will discuss with my mentors if it would be better to start working on the Heightfield class. I am excited for whatever comes next!

hecris

View Blog Post

Week 1 Check-In

hecris
Published: 06/01/2019

Hello again!

For this first week, my goal was to implement Parabola into Box detection. I started off by writing some test cases that attempted to collide the CollisionParabola into CollisionBox. Of course, since no detection exists yet, the tests initially failed, but writing them put me in the direction to brainstorm about possible solutions. I decided to implement a simple algorithm: iterate through the 6 faces of the box, test their intersection with the parabola, and find the earliest point of intersection. If an intersection is found, it will return the surface point and surface normal. After passing all test cases, I opened a pull request to the main repository for review and discussion. My first week went well, with no significant obstacles.

For the remainder of the week, I will think about ways to improve my Parabola into Box algorithm. Additionally, I will start looking into the CollisionInvSphere to prepare for next week's goal: Parabola into Inverse Sphere. I anticipate that this will be more challenging and I can't wait to take it on. Stay tuned for next week's update!

hecris

View Blog Post

Welcome!

hecris
Published: 05/29/2019

Hello and welcome to my blog! This summer, I am excited to be working on Panda3D to accomplish the following goals:

  • Parabola into Box detection
  • Parabola into Inverse Sphere detection
  • Box into Capsule detection
  • Implement a Heightfield class for collision with uneven terrains

The coding period has officially begun, so stay tuned for my weekly updates!

hecris

 

View Blog Post