6 kyu

Points are collinear in 3D

Description:

Write a function that accepts a list of at least three points in 3D and returns a boolean value that tells whether the points are collinear or not.

From Wikipedia: In geometry, collinearity of a set of points is the property of their lying on a single line. A set of points with this property is said to be collinear (sometimes spelled as colinear). In greater generality, the term has been used for aligned objects, that is, things being "in a line" or "in a row".

Data types

The points that you will get are using the Point3d data type which consists of a tuple with three floats:

(x, y, z)

Note:

  • Don't expect getting one or two or none points in the input, all the inputs contain three points at least.
  • Some inputs might contain one or more duplicated points.
Geometry
Mathematics
Algorithms

Stats:

CreatedApr 15, 2022
PublishedApr 15, 2022
Warriors Trained447
Total Skips7
Total Code Submissions1106
Total Times Completed83
Python Completions83
Total Stars8
% of votes with a positive feedback rating83% of 27
Total "Very Satisfied" Votes20
Total "Somewhat Satisfied" Votes5
Total "Not Satisfied" Votes2
Total Rank Assessments14
Average Assessed Rank
6 kyu
Highest Assessed Rank
5 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • zefr0x Avatar
  • flodem Avatar
Ad