geo_interSec_3spheres: Calculate the an intersection point of three spears

View source: R/geometry.R

geo_interSec_3spheresR Documentation

Calculate the an intersection point of three spears

Description

Using numerical solver to calculate a intersecting point upon an initial guess.

Usage

geo_interSec_3spheres(param_matrix, initial_guess)

Arguments

param_matrix

for each spear a vector with its coefficients is needed: c(x0,y0,z0,r) so the matrix will have rows and four columns

initial_guess

A vector with the intial guess c(x = 0,y = 0,z = 1)

Details

The spears will be calculated from the form (x - x0)^2 + (y - y0)^2 + (z - z0)^2 - r^2).

Value

vector with named coordinates

Author(s)

Florian Wagner florian.wagner@wagnius.ch

Examples

library(nleqslv)
params <- matrix(c(0 , 0, 0, 20.728,
                   15, 0, 0, 31.304,
                   0 ,10, 0, 26.576), ncol = 4, byrow = TRUE)
colnames(params) <- c("x0","y0","z0","r")
params
geo_interSec_3spheres(params, c(0,0,1))

wagnius-GmbH/slvwagner documentation built on Jan. 19, 2025, 7:10 a.m.