diff --git a/blog/index.html b/blog/index.html index d6ddf1e..95bf81e 100644 --- a/blog/index.html +++ b/blog/index.html @@ -1 +1 @@ -
This article tackles the problem of projectile prediction, as in, where one should aim a projectile if they want it to hit a moving target. The general idea is that if we are able to model the target's movement with a function of \(t\), then we should be able to solve for a way to intercept its path with our own projectile's. Let's start with some definitions:
Finding the form that \(\vec{p}(t)\) and \(\vec{b}(t)\) take is part of the challenge of setting up the problem. Factors such as initial position, gravity, velocity and any other source of acceleration must be included. Here are some common examples for target position:
After we have the forms of \(\vec{p}(t)\) and \(\vec{b}(t)\), we can equate them.
For this, I will be assuming the target is moving in a parabola (affected by gravity with initial velocity) and the projectile moves at a constant velocity from the origin.
$$ \begin{align} \vec{b}(t) &= \vec{p}(t) \\ \vec{r}t &= \vec{p}(0) + \vec{v}t + \frac{1}{2}\vec{a}t^2 \\ \vec{r} &= \frac{\vec{p}(0) + \vec{v}t + \frac{1}{2}\vec{a}t^2}{t} \end{align} $$
Now we have \(\vec{r}\) isolated, but we don't know what \(t\), the time of impact, is. We obviously can't find a solution in this form, but we have a trick that will make this possible to solve — we can dot product both sides by themselves.
So, we have a quartic equation whose roots are the times at which the projectile will hit the target. The roots are, of course, not necessarily real, which nicely highlights the fact that not all situations have a real(useful) solution that we can use. Such as a situation where the target is moving away from us faster than our projectile moves, making it impossible for us to ever hit it.
Taking our quartic coefficients, and using a quartic solver library, we can find the roots of the equation. Taking the real roots (if they exist), we can use our \(\vec{p}(t)\) function to find the position of the target at each time, which gives us the direction we must shoot in to hit our target.
If you get it working correctly, it should look something like this:
Note: the aimbot is doing corrections to make the projectile aim toward where the feet of the target should be.
Here's another demonstration with both target and projectile being affected by gravity:
This article tackles the problem of projectile prediction, as in, where one should aim a projectile if they want it to hit a moving target. The general idea is that if we are able to model the target's movement with a function of \(t\), then we should be able to solve for a way to intercept its path with our own projectile's. Let's start with some definitions:
Finding the form that \(\vec{p}(t)\) and \(\vec{b}(t)\) take is part of the challenge of setting up the problem. Factors such as initial position, gravity, velocity and any other source of acceleration must be included. Here are some common examples for target position:
After we have the forms of \(\vec{p}(t)\) and \(\vec{b}(t)\), we can equate them.
For this, I will be assuming the target is moving in a parabola (affected by gravity with initial velocity) and the projectile moves at a constant velocity from the origin.
$$ \begin{align} \vec{b}(t) &= \vec{p}(t) \\ \vec{r}t &= \vec{p}(0) + \vec{v}t + \frac{1}{2}\vec{a}t^2 \\ \vec{r} &= \frac{\vec{p}(0) + \vec{v}t + \frac{1}{2}\vec{a}t^2}{t} \end{align} $$
Now we have \(\vec{r}\) isolated, but we don't know what \(t\), the time of impact, is. We obviously can't find a solution in this form, but we have a trick that will make this possible to solve — we can dot product both sides by themselves.
So, we have a quartic equation whose roots are the times at which the projectile will hit the target. The roots are, of course, not necessarily real, which nicely highlights the fact that not all situations have a real(useful) solution that we can use. Such as a situation where the target is moving away from us faster than our projectile moves, making it impossible for us to ever hit it.
Taking our quartic coefficients, and using a quartic solver library, we can find the roots of the equation. Taking the real roots (if they exist), we can use our \(\vec{p}(t)\) function to find the position of the target at each time, which gives us the direction we must shoot in to hit our target.
If you get it working correctly, it should look something like this:
Note: the aimbot is doing corrections to make the projectile aim toward where the feet of the target should be.
Here's another demonstration with both target and projectile being affected by gravity:
I have developed the following browser extensions for chromium-based browsers. They are not available on the Chrome Web Store, but you can still install them by loading them as unpacked extensions.
Allows for your own custom HTML to be used as your browser's new tab page, overriding it. Example code is provided for website links, but any valid HTML is possible.
I was inspired to develop this because of Microsoft Edge (Chromium)'s horrible new tab page performance on startup, as well as Brave's inflexible and ugly new tab page (imho).
Register address bar keywords to use as webpage shortcuts. Useful for accessing complicated URLs with an easy-to-remember name, and without having to find it in your bookmarks. For example, standup zoom links: searching '! standup'
can send you to https://zoom.us/j/XYZABC.
Developed as a response to an extension of similar name that forwards all search queries to its own server to perform a similar function, but is likely selling its users' search history.
I have developed the following browser extensions for chromium-based browsers. They are not available on the Chrome Web Store, but you can still install them by loading them as unpacked extensions.
Allows for your own custom HTML to be used as your browser's new tab page, overriding it. Example code is provided for website links, but any valid HTML is possible.
I was inspired to develop this because of Microsoft Edge (Chromium)'s horrible new tab page performance on startup, as well as Brave's inflexible and ugly new tab page (imho).
Register address bar keywords to use as webpage shortcuts. Useful for accessing complicated URLs with an easy-to-remember name, and without having to find it in your bookmarks. For example, standup zoom links: searching '! standup'
can send you to https://zoom.us/j/XYZABC.
Developed as a response to an extension of similar name that forwards all search queries to its own server to perform a similar function, but is likely selling its users' search history.
Software developer with 2 years of professional experience.
Software developer with 2 years of professional experience.
Third-year Computer Engineering student at University of Waterloo
Candidate for Honours Computer Engineering, Co-op (BASc)
Strong programming capabilities in:
Designed and implemented an interface between phones and the infotainment system to display navigation information to the driver.
Developed a system that retrieves album information from connected phones and displays the active media information on the car display
Improved the reliability of software running on transmitters by integrating better with the host Windows operating system.
Redesigned a Qt UI to allow for switching between portrait and landscape modes. Developed an NTP time-synchronization component that has protection against incorrect values.
Third-year Computer Engineering student at University of Waterloo
Candidate for Honours Computer Engineering, Co-op (BASc)
Strong programming capabilities in:
Designed and implemented an interface between phones and the infotainment system to display navigation information to the driver.
Developed a system that retrieves album information from connected phones and displays the active media information on the car display
Improved the reliability of software running on transmitters by integrating better with the host Windows operating system.
Redesigned a Qt UI to allow for switching between portrait and landscape modes. Developed an NTP time-synchronization component that has protection against incorrect values.
Type in the text box below to see the Unicode breakdown of the text.
Enter a valid hexadecimal codepoint below and click Generate, the output will be displayed in the box to the right.
Glyph | Code | Name | Description |
U+202E | Right-to-left override | Reverses the order of characters like so: 'gnp.exe' to 'gnp.exe' | |
U+FDFD | Basmala | Islamic phrase, really big unicode character, breaks many text inputs because of its size | |
U+200D | Zero width joiner | Joins two or more characters in a sequence to make a new emoji. Man + ZWJ + White hair = 👨🦳 | |
U+200B | Zero-width space | Used to separate words in languages with no explicit spacing |
An easy method to enter special characters is by using an AutoHotkey script. You can use the Send command with codepoint literals like so:
CapsLock & \::Send {U+0300}
The above allows you to use caps-lock+backslash as a hotkey to send a combining grave accent (attaches to the previous character). I use a series of hotkeys to more easily type accents and symbols, you can check that out at this repository.
Type in the text box below to see the Unicode breakdown of the text.
Enter a valid hexadecimal codepoint below and click Generate, the output will be displayed in the box to the right.
Glyph | Code | Name | Description |
U+202E | Right-to-left override | Reverses the order of characters like so: 'gnp.exe' to 'gnp.exe' | |
U+FDFD | Basmala | Islamic phrase, really big unicode character, breaks many text inputs because of its size | |
U+200D | Zero width joiner | Joins two or more characters in a sequence to make a new emoji. Man + ZWJ + White hair = 👨🦳 | |
U+200B | Zero-width space | Used to separate words in languages with no explicit spacing |
An easy method to enter special characters is by using an AutoHotkey script. You can use the Send command with codepoint literals like so:
CapsLock & \::Send {U+0300}
The above allows you to use caps-lock+backslash as a hotkey to send a combining grave accent (attaches to the previous character). I use a series of hotkeys to more easily type accents and symbols, you can check that out at this repository.