%pylab inline %load_ext autoreload %autoreload 2 import os from mpl_toolkits.mplot3d.axes3d import Axes3D from pycoasters.images import show from pycoasters.coaster import Coaster ride_name = 'gatekeeper' data_folder = 'data/2013-09-28-cedar-point' ride_folder = os.path.join(data_folder, ride_name) gatekeeper = Coaster.load(ride_folder) f = figure(figsize=(8,6)) ax = subplot(111) gatekeeper.plot_original_xyz(ax) f = figure(figsize=(8,6)) ax = subplot(111) gatekeeper.plot_reoriented_xyz(ax) # Cedar Creek Mine Ride: an older steel roller coaster with some very jerky accelerations mine_ride = Coaster.load(os.path.join(data_folder, 'cedar_creek_mine_ride')) # Witches' Wheel: a ride consisting of a ring of cars attached to a wheel which # spins rapidly and then slowly tilts from horizontal to vertical and then back to horizontal witches_wheel = Coaster.load(os.path.join(data_folder, 'witches_wheel')) f, ax = subplots(2, 1, figsize=(8,12)) mine_ride.plot_reoriented_xyz(ax[0]) witches_wheel.plot_reoriented_xyz(ax[1]) f = figure(figsize=(10,7)) ax = subplot(111, projection='3d') witches_wheel.plot_xtz_3d(ax) f = figure(figsize=(10,7)) ax = subplot(111, projection='3d') gatekeeper.plot_xtz_3d(ax) # Gatekeeper show(gatekeeper.portrait_square()) # Witches Wheel show(witches_wheel.portrait_square()) # Cedar Creek Mine Ride show(mine_ride.portrait_square()) # Gatekeeper show(gatekeeper.portrait_line()) # Witches Wheel show(witches_wheel.portrait_line()) # Cedar Creek Mine Ride show(mine_ride.portrait_line()) # Gatekeeper figure(figsize=(10,10)) gatekeeper.plot_portrait_polar(subplot(111,polar=True)) # Witches Wheel figure(figsize=(10,10)) witches_wheel.plot_portrait_polar(subplot(111,polar=True)) # Cedar Creek Mine Ride figure(figsize=(10,10)) mine_ride.plot_portrait_polar(subplot(111,polar=True))