Permalink
Browse files

updated illustrations for chapter 1

  • Loading branch information...
1 parent 49b433e commit 79f1802469c164ba27457f2e54e98842272af8fd @shiffman shiffman committed Jun 19, 2012
View
Binary file not shown.
View
@@ -1,3 +0,0 @@
-Magic book project yeah!
-
-A plugin can create several elements in the handler -> Then the user just has to make these separate elements available in the template.
View
@@ -0,0 +1,41 @@
+## Installing the App
+
+1. Clone this repository
+
+ $ git clone https://github.com/runemadsen/Magic-Book-Project.git
+ $ cd Magic-Book-Project
+
+2. Use Ruby 1.9.3. To manage multiple rubies, install either [RVM](https://rvm.io//) or [rbenv](https://github.com/sstephenson/rbenv).
+3. Run bundler to install gems (if you don't have bundler do `$ gem install bundler`).
+
+ $ bundle install
+
+4. We are using a custom build of the asciidoc gem. To keep track of changes to
+this gem use git [submodules](http://git-scm.com/book/en/Git-Tools-Submodules).
+From the root of the repository run the following two commands to initialize
+the submodule and then get any updates.
+
+ $ git submodule init
+ $ git submodule update
+
+5. Now you need the asciidoc program. We recommend installing asciidoc with
+[homebrew](http://mxcl.github.com/homebrew/). Once you have homebrew installed
+get the asciidoc keg like so
+
+ $ brew install asciidoc
+
+### Notes
+
+If your book will include code blocks you'll need to install pygments for
+syntax highlighting.
+
+ $ sudo easy_install Pygments
+
+## To run the app
+
+1. `cd Magic-Book-Project`
+2. `shotgun config.ru`
+3. Then visit: localhost:9393/create_html/:filename in your browser
+
+If it's been a while since you've used this app, update the asciidoc gem by
+running `$ git submodule update`.
View
@@ -22,9 +22,18 @@ class Application < Sinatra::Base
@document = AsciiDoc::AsciiDocument.new("public/#{params[:filename]}", { :debug_xml_to_file => "public/#{params[:filename]}.xml" })
@document.render(:html, :template => "public/noc_pdf/views", :output => "public/noc_pdf/index.html")
- # then render pdf from it
bin_args = []
- bin_args << { :option => "--header-html", :value => "public/noc_pdf/views/header.html"}
+ # Margins 0.75 inches bottom, left and right, not sure about top yet b/c of header
+ bin_args << { :option => "--margin-bottom", :value => 10 }
+ bin_args << { :option => "--margin-left", :value => 19.05 }
+ bin_args << { :option => "--margin-right", :value => 19.05 }
+
+ # Page dimensions, 7.5x9.25 inches
+ bin_args << { :option => "--page-height", :value => 234.95 }
+ bin_args << { :option => "--page-width", :value => 190.5 }
+
+
+ bin_args << { :option => "--header-html", :value => "templates/print/views/header.html"}
bin_args << { :option => "--header-spacing", :value => 10} # make space between header and content
bin_args << { :option => "--margin-top", :value => 30} # the header spacing moves the header up, so push it down again
View
@@ -0,0 +1,21 @@
+General
++ how to setup PDF margins / page size etc (using inches)
++ project timeline/goals
+
+Parsing
++ go through github issues list?
++ code comments (only above or to the side ok also)
++ code comments, dealing with long / multi-line ones
++ image captions
+
+Design
++ finalize pixel width for HTML (need for finalizing illustrations/screenshots)
++ create sample CSS templates for PDF and HTML
++ discuss syntax highlighting / code comments
+
+JavaScript
++ Lazy Loading (see: http://processingjs.nihongoresources.com/bezierinfo/)
++ DAT GUI?
++ Box2D / toxiclibs
+
+Project Site
View
Binary file not shown.
View
@@ -66,15 +66,15 @@ void draw() {
In the above example, we have a very simple world—a blank canvas with a circular shape (a “ball”) traveling around. This ball has some properties, which are represented in the code as variables.
- *_LOCATION:_* *_x and y_*
- *_SPEED:_* *_xspeed and yspeed_*
+*_LOCATION:_* *_x and y_* +
+*_SPEED:_* *_xspeed and yspeed_* +
In a more advanced sketch, we could imagine having many more variables:
- *_ACCELERATION:_* *_xacceleration and yacceleration_*
- *_TARGET LOCATION:_* *_xtarget and ytarget_*
- *_WIND:_* *_xwind and ywind_*
- *_FRICTION:_* *_xfriction and yfriction_*
+*_ACCELERATION:_* *_xacceleration and yacceleration_* +
+*_TARGET LOCATION:_* *_xtarget and ytarget_* +
+*_WIND:_* *_xwind and ywind_* +
+*_FRICTION:_* *_xfriction and yfriction_* +
It’s becoming more and more clear that for every concept in this world (wind, location, acceleration, etc.), we need two variables. And this is only a two-dimensional world. In a 3D world, we’ll need [var]*x*, [var]*y*, [var]*z*, [var]*xspeed*, [var]*yspeed*, [var]*zspeed*, and so on.
View
@@ -1,5 +1,2 @@
-include::noc_introduction.asciidoc[]
-
-include::noc_chapter01.asciidoc[]
-
-include::noc_chapter02.asciidoc[]
+//include::test.asciidoc[]
+include::chapters/01_vectors.asc[]
Oops, something went wrong.

0 comments on commit 79f1802

Please sign in to comment.