All Questions
822
questions
1
vote
1
answer
92
views
Find two tangent points for given circle and two points inside the circle , Lua
I have two Points A and B (given with coordinates ax, ay and bx, by).
This two points are inside of given Circle C (given with coordinates cx, cy and radius cr).
How to find points T1 and T2?
Points ...
0
votes
1
answer
80
views
Get a vector that starts at a given point and is a tangent to some given object
Currently the code recives a rectangle and determines the Vector2 positions of its corners. It will then calculate the new positions of the corners with the Sin and Cos relative to the angle of the ...
0
votes
0
answers
46
views
Get rotation angle from rotation vector over axis Y/Z
For some of you this could be a really easy question, but I didn't find a solution or was too dumb to understand some of the math papers.
I am currently working in Python but that shouldn't matter.
...
0
votes
1
answer
70
views
Calculating angle between 3 points give weird result according pattern angle
I want to calculate the angle between two segments in 2D space. The two segments are defined by AB and BC.
The result of the calculation seems to vary according to the orientation of the vectors.
...
-4
votes
1
answer
57
views
rust how recreate function from js [closed]
function add(...args){
if (args.length === 0) return [];
const a = args[0];
let res = [];
for (let i = 0; i < a.length; i++){
const elements = args.map(x => x[i]);
res.push(Array....
0
votes
1
answer
49
views
How are cross products being used to determine the "flatness" of a bezier curve segment in this code?
I have a script that calculates the points in a cubic bezier curve and then draws line segments between the points to draw the curve. The function to do these calculations is recursive and I would ...
0
votes
0
answers
81
views
WorldToScreen function
I am creating a mod for an UnrealEngine game. Sadly the worldtoscreen function in my SDK is broken. Im using CodeRedGenerator and the game is Rocket Legaue. Canvas.Project always returns (0,0,0) for ...
0
votes
0
answers
40
views
Contour Integration with Sympy Vector: Discrepancy in Result
I'm attempting a contour integration using sympy's vector module, but the result differs significantly from my expectations.
from sympy.vector import CoordSys3D, ParametricRegion, ParametricIntegral
...
0
votes
1
answer
157
views
How to get a 3D vector in the same direction as another vector limited by an angle?
If I have two 3D vectors as shown by the blue and red vector in the image below, where the red vector is at an angle of more than 20 degrees from the blue vector, how could I calculate a new vector (...
0
votes
0
answers
19
views
matrix cxr * vector c VS vector r * matrix cxr
I wanted to know if multiplying a matrix and a vector always gives the same result even if the vector is on the left or the right side.
matrix cxr * vector c == vector r * matrix cxr
Thank you in ...
1
vote
0
answers
50
views
Check if the point is inside of half-plane and cut the segment
I have 4 half-planes, that are defined as base point and normalized tangent:
local frameX, frameY, frameW, frameH = 25, 25, 750, 550
local halfPlanes = {
-- halfplane as starting point and ...
2
votes
1
answer
549
views
Finding perpendicular vector to a given vector and in respect to former position in 3D space
I have 3 vectors, xyz, and i want to change only 1 and then calculate the other 2 in respect to their former directions (the closest possible to them). And i want to do it the most efficient way in ...
0
votes
0
answers
15
views
Shifting a tilemap in the opposite direction of a mouse click with HTML Canvas
I have a .png map file that I would like to respond to player mouse clicks. To simulate the player moving in the direction of the mouse click, I believe the map should shift in the opposite direction ...
0
votes
1
answer
183
views
Direction vector: Correctly scale sin(radians(x)) + cos(radians(z)) with y axis
I have an issue with the directional transform math for a voxel raytracer I'm working on in Python. X axis is left-right, Y axis is up-down, Z axis is forward-backward: I calculate view direction from ...
1
vote
1
answer
71
views
Convert list index to a 3D position based on width and height
I'm working on a CPU voxel raytracer in Python. With the amount of costly calculations involved everything must be as efficient as possible especially storing and fetching point data in space. I ...