Miguel Casillas

Quicksort

Description Quicksort is a very fast, very efficient “divide and conquer” sorting algorithm invented by Tony Hoare in 1960 in Moscow State University. The algorithm works this way: First, a pivot is chosen (for this example, we will use the low index. A more efficient pivot would be the median of the first, middle and […]

Insertion Sort

Description The Insertion sort is a sorting algorithm that takes each item and places it into the sorted list. The algorithm works this way: It iterates through the array once. It will take the current element and compare it with the previous element, if it’s smaller, then it will keep comparing it with elements down […]

Gnome Sort

Description The Gnome sort is a very basic sorting algorithm that combines the Insertion sort and the Bubble sort. The code size is very small and easy to understand, uses only one loop and it’s a stable algorithm. Unfortunately, it’s not very fast compared to other algorithms. It was invented by Hamid Sarbazi-Azad in 2000. […]

Distance between two points on a sphere

Intro: The main part of the project I’m currently working on is about traveling around little planets. For some calculations, we needed to know the distance between two objects standing on the planet, so, we had to do some research on how to find the spherical distance between two points. The “great-circle distance” formula required […]

Moving Sphere to Containing Sphere’s Edge

Our previous moving sphere to sphere function works for when the moving sphere starts outside the static sphere sphere, but for when the moving sphere is inside the static sphere, it automatically says there was a collision. In the case we have a smaller moving sphere starting inside a bigger static sphere and we want […]

Moving Sphere to Static Sphere

A moving sphere to a static sphere test is basically a slightly modified ray to sphere test. First, we expand the static sphere’s radius by the moving sphere’s radius. Then, we call our ray to sphere function, sending the normalized velocity vector as the ray’s direction. Then, we just need to check if the collision […]

Ray to Sphere (returning time)

In our previous ray to sphere test, we just checked if the ray collided with the sphere. Sometimes, however, we need to check the time value in which this collision happens. The test is similar, however, some things need to be added. The distance between a point ‘P’ on the very edge of the sphere […]

Sphere to Plane

This function will allow us to check if a sphere is colliding with a plane. Our half space test helped us see if a point was in front of a plane, on a plane or behind a plane, so, we can base ourselves on that one and, after editing it a little, transform it into […]

Half-Space Test

The half-space test allows us to see the position of a point respective to a plane. We can determine if this point is in front of the plane, behind the plane or on the plane. This is a very useful test, as it is used in many types of collision detection functions, especially when testing […]

Select the fields to be shown. Others will be hidden. Drag and drop to rearrange the order.
  • Image
  • SKU
  • Rating
  • Price
  • Stock
  • Availability
  • Add to cart
  • Description
  • Content
  • Weight
  • Dimensions
  • Additional information
Click outside to hide the comparison bar
Compare