6 kyu

Angle between two planes

Description:

Your task is to write a function angle_planes(lstPts) that calculates the angle between two planes, each of them being defined by a tuple of three points.

Input:

lstPts – list of 6 tuples that contain 3 coordinates: x, y and z for each point. The first three points are defining the first plane, the second three are for the second one. All coordinates are integers.

Output:

A float: the angle between the two planes in radians and rounded off to 2 decimal places.

Example:

angle_planes([(2,1,2),(1,2,2),(2,2,0), (2,0,0),(2,0,2),(0,2,2)])

Should return

0.34
Geometry
Fundamentals
Algorithms

More By Author:

Check out these other kata created by eqlion

Stats:

CreatedSep 18, 2016
PublishedSep 20, 2016
Warriors Trained286
Total Skips0
Total Code Submissions508
Total Times Completed84
Python Completions84
Total Stars11
% of votes with a positive feedback rating91% of 38
Total "Very Satisfied" Votes32
Total "Somewhat Satisfied" Votes5
Total "Not Satisfied" Votes1
Total Rank Assessments4
Average Assessed Rank
6 kyu
Highest Assessed Rank
5 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • eqlion Avatar
  • Blind4Basics Avatar
Ad