replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Circle 3D
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Circle 3D

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit
View previous topic :: View next topic  
Author Message
stfark1



Joined: 02 Sep 2008
Posts: 227

PostPosted: Sun Oct 27, 2024 1:45 am    Post subject: Circle 3D Reply with quote

Is there a function available in Silverfrost Fortran to calculate the center and radius of a circle with 3 x,y,z coordinates on the circumference? Sid Kraft
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2601
Location: Sydney

PostPosted: Sun Oct 27, 2024 3:05 am    Post subject: Reply with quote

Sid,

This is a fairly easy calculation ( which I have not done for many years !)

For the line between two points on the circumference, it can be written as:
l1.x + m1.y + n1 = 0 ( solve for l1,m1,n1) (Function line_between_two_points)

the normal to this line, that passes through the mid point on the line, also goes through the centre of the circle, which is:
m1.x - l1.y + k1 = 0 ( solve for k1 ) (Function line_through_one_point)

similarly for points 2 and 3 (or 1 and 3); solve for l2,m2,n2 then k2

Then find the intersection of lines (m1,-l1,k1) and (m2,-l2,k2), testing for edge conditions, when m1 or m2 are zero. ( the lines can not be parallel ! )
(Function intersect_two_lines)
All you need is the inverse of a 2x2 matrix !

An easy calculation that can be captured in a subroutine
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8087
Location: Salford, UK

PostPosted: Sun Oct 27, 2024 8:44 am    Post subject: Reply with quote

John

I think that Sid probably means a sphere.

Sid

There is no such function provided but Google AI will tell you how to go about writing your own function.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group