POV-Ray : Newsgroups : povray.general : Calculating a plane through a bunch of points : Re: Calculating a plane through a bunch of points Server Time
8 Jul 2024 14:35:56 EDT (-0400)
  Re: Calculating a plane through a bunch of points  
From: Ger
Date: 11 Oct 2014 20:57:53
Message: <5439d211$1@news.povray.org>
Bald Eagle wrote:

> Ger <No.### [at] ThankYou> wrote:
> 
>> I just read (part of) the wiki page on linear regression, but since my
>> math knowledge hovers just above zero that pag
> e was mostly gibberish for me.
> 
> Right - I'd have to say that very few people would know how to, or would
> be
> expected to implement, a least-squares regression analysis from scratch. 
> It's a button-push feature on a lot of calculators, and it's implemented
> in spreadsheets like Excel or Open Office, as well as others.
> 
> If it needs to be done on the fly, you might have to see if POV-Ray has
> the math
> functions required to give you what you need.  Otherwise you could
> generate your data set with a 3rd party tool, and then run POV-Ray
> afterwards.
> 
> plugging   povray least squares   into Google actually seems to pull up a
> number of links that look like they address exactly the problem you are
> looking for a
> solution to.  Surf around some, and maybe you'll hit upon something
> useful.  Let me know what you come up with.

Found a piece of code at

http://stackoverflow.com/questions/10781639/how-to-compute-normal-vector-to-least-square-plane-in-povray-only

Needed some slight tweaking but for as far as I can see now it does its job.

-- 

Ger


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.