Skip to content

Instantly share code, notes, and snippets.

@dayne
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dayne/a0c1cac27890181d7a52 to your computer and use it in GitHub Desktop.
Save dayne/a0c1cac27890181d7a52 to your computer and use it in GitHub Desktop.
Decision Theature North - width of screens fun
See the picture and more details about this on my Google+ post over at:
https://plus.google.com/+DayneBroderson/posts/V21SUJhgEGB
The real room is a width 21' 5 3/4''.
#!/usr/bin/ruby
include Math
def total_7screen_dtn_width( w, a )
r = a * Math::PI / 180 # angle in radians
w2 = w*cos(r)
w3 = w*cos(r*2)
total = w + 2*(w2 + w3)
end
screens = [
{ :size => 65, :width => 57.7 },
{ :size => 70, :width => 61.4 },
{ :size => 75, :width => 66.5 },
{ :size => 85, :width => 74.9 }
]
angles = [ 20, 25, 30 ]
angles.each do |angle|
puts "A 7 Screen DTN with Angle: #{angle}"
screens.each do |s|
tw = total_7screen_dtn_width( s[:width], angle )
tw_feet = tw / 12.0
puts "\t#{s[:size]}'' screen size is #{ sprintf( "%.3f", tw_feet) } feet wide total"
end
end
A 7 Screen DTN with Angle: 20
65'' screen size is 21.212 feet wide total
70'' screen size is 22.572 feet wide total
75'' screen size is 24.447 feet wide total
85'' screen size is 27.535 feet wide total
A 7 Screen DTN with Angle: 25
65'' screen size is 19.705 feet wide total
70'' screen size is 20.969 feet wide total
75'' screen size is 22.711 feet wide total
85'' screen size is 25.580 feet wide total
A 7 Screen DTN with Angle: 30
65'' screen size is 17.945 feet wide total
70'' screen size is 19.096 feet wide total
75'' screen size is 20.682 feet wide total
85'' screen size is 23.294 feet wide total
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment