kink3d / ksplines Goto Github PK
View Code? Open in Web Editor NEWA bezier Spline system for Unity.
License: MIT License
A bezier Spline system for Unity.
License: MIT License
Currently Spline Agent evaluates based on t = 1 second / speed
. Add an option to evaluate where speed is distance travelled along the spline in meters per second.
The spline system we used a few times had the option to get the closest point on the spline with a world position in parameter and a sample precision. It would be great to have it here as well!
In the code you have a function you say evaluates the normal:
internal static Vector3 EvaluateSplineSegmentNormal(SplinePoint pointA, SplinePoint pointB, float t)
{
// Evaluate the normal for value t between points A and B
return ((6.0f * (t * t)) - (6.0f * t)) * pointA.position + ((3.0f * (t * t)) - ((4.0f * t) + 1)) * pointA.GetHandle(Direction.Forward)
+ ((-6.0f * (t * t)) + (6.0f * t)) * pointB.position + ((3.0f * (t * t)) - (2.0f * t)) * pointB.GetHandle(Direction.Backward);
}
But as far as I know there is not a way to evaluate the normal just by multiplying the points P0..P1 by some polynomials. Generally you take the second derivative to get the curvature and cross it with the tangent then normalise. That should result in a normal/binormal. Could you elaborate on what this is and how you created it? I have never seen something like this before when it comes to evaluating normals of bezier curves.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.