tag:support.nodebox.net,2012-11-01:/discussions/show-your-work/107-seven-orders-of-magnitudeNodeBox: Discussion 2015-09-11T13:41:38Ztag:support.nodebox.net,2012-11-01:Comment/365612462015-04-13T17:30:06Z2015-04-13T17:30:06ZSeven Orders of Magnitude<div><p>I can answer!</p>
<p>The viewer zooms in to a scale of 6400% and out to a scale of
1%.</p>
<p>See <a href="https://github.com/nodebox/nodebox/blob/master/src/main/java/nodebox/client/Viewer.java">
https://github.com/nodebox/nodebox/blob/master/src/main/java/nodebo...</a>
for the source!</p>
<p>Best,</p>
<p>F</p></div>Frederik De Blesertag:support.nodebox.net,2012-11-01:Comment/365612462015-09-11T02:13:26Z2015-09-11T02:13:26ZSeven Orders of Magnitude<div><p>A followup...</p>
<p>Yesterday I was curious about how much of a size range I could
export from NodeBox in a single PDF doc, so I did some
experiments.</p>
<p>There seems to be an upper limit of 14,400 by 14,400 pixels for
PDFs. I wanted to see how this worked on an iPad, so created a
world map that was 14400 by 10800. I put a red dot over the San
Francisco bay area and inside that dot wrote the names and titles
of 36 of my colleagues who work there in 5 and 2 point Verdana.
Next to one of these names I placed the first sentence of the
Gettysburg Address in .5 Verdana and above that an even smaller
sentence in .25 Verdana.</p>
<p>I then tried viewing this doc from various apps and browsers on
the Mac, PC, and iPad. The results varied. Some apps/browsers let
me zoom all the way down to .25 Verdana; with others I couldn't
even clearly read the 5 pt. names inside the dot.</p>
<p>The best results came from an iPad app called PDF Expert (which
can be called directly from another great app called Documents).
The zooming was quick and buttery smooth; the doc looked great at
every level. It's wonderful pinch-zooming into something like
that.</p>
<p>I am creating some large and dense visualizations that I need to
share with people who don't have NodeBox. Large PDF exports is an
interesting option and you could pack a lot into 155 million
pixels. Just be aware that not all people will be able to zoom all
the way down.</p>
<p>John</p></div>johntag:support.nodebox.net,2012-11-01:Comment/365612462015-09-11T13:41:33Z2015-09-11T13:41:33ZSeven Orders of Magnitude<div><p>A followup to my followup...</p>
<p>NodeBox supplies an ample range of magnitude but when pushing
the boundaries there is another limiting factor: memory and
performance.</p>
<p>To test this limit, I created an array of randomly colored
"person dots", each drawn at a size of 4 pixels with a random
person name drawn in .5 point Verdana. A block of 100 such dots
fits in a rectangle of only 45 x 45 pixels and is quite easy to
read at full magnification (PNG screenshot at less than full
magnification attached).</p>
<p>In theory, I could fill my 14,400 by 10, 800 PDF with 7.68
million of these dots!</p>
<p>I was able to make ten thousand without too much trouble;
NodeBox became sluggish, but it drew them. I was able to double
this to 20,000 dots. But when I tried for 30,000 NodeBox spun its
wheels for a few minutes and eventually coughed up the following
error message:</p>
<p>"Out of memory. Are you trying to process an infinite list?"</p>
<p>I thought I might be able to reduce the overall calculation load
by saving 10,000 dots at a time in an SVG file and rendering that
multiple times, but this only made matters worse. NodeBox stores
text as shapes so 10,000 names is a lot of shapes to draw. The SVG
file weighed in at 83 megs and took four minutes to load! I could
draw two of them, but not three.</p>
<p>So while there is theoretically space for millions of text
strings in a single PDF, the true upper limit is more like ten
thousand.</p>
<p>John</p></div>john