Skip to content

guiglass/Simple-Circle-Fitter-For-Unity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Circle Fitter

Fully Self Contained Algorithms.

Two scripts that show two differnt approaches to fitting a circle to 2d data points on a plane. Both scripts are written in c# and are entirely stand alone, requiring no additional libraries. You only need to drag one of the two desireds scripts and add it as a component to whatever gameobject you wish in your scene. Then add some randomly placed transforms in the scene and add them to the coordinates list to be fitted.

Note that with any circle you must specify at least three coordinates in order to define it, axiomatically, an infinite number of circles can be defined by trying to use two or less coordinates. Thus it is a requirement for these scripts that you always have 3 or more coordinates in the arrays!

Video:

An example and tutorial video on how to use the scripts:

Youtube Video

It would be a kind gesture if you did leave some attribution somewhere near any functions you copy, if you do copy any, such as:

//Credits: Grant Olsen - 2018

Or you may leave the credit in the original file, however none of these are a requirement (I consider this as CC-Zero, so please enjoy :D ).

Feel free to use this example in any way you see fit (without restriction of any kind) as well as redistribute, modify and share it with all of your friends and co-workers.

Legal notice: By downloading or using any resource from this example you agree that I (the author) am not liable for any losses or damages due to the use of any part(s) of the content in this example. It is distributed as is and without any warranty or guarantees.

Project by: Grant Olsen (jython.scripts@gmail.com) Creation year: 2018

Big credits to:

About

Circle Radius and Center Locating Scripts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages