"graphics" entries

Elegant Outlines with SVG paint-order

Get fine-grained control over your design with an SVG 2 property implemented by many browsers.

spline_1

SVG rendering uses a painter’s model to describe how graphics are rendered to the screen. Like layers of paint on a wall, content on top obscures content below. The SVG specifications define which content gets painted over which other content. The different parts of each shape — the stroke, fill, and markers — each create layers of paint. Those shapes are then layered one on top of the other, in the order they are defined in the document.

Two new properties introduced by the SVG 2 specification, z-index and paint-order, allow you to change up the rendering rules.

Most web designers will be familiar with z-index, which has been supported in CSS layout for years. Unfortunately, it is not yet supported in any major web browser for SVG content. At present, the only solution is to arrange your markup (or the DOM created by scripts) so that elements are listed in the order you want them to be painted.

In contrast, the paint-order property has already been implemented in a number of web browsers. If you’re willing to make adjustments in your design according to browser support level, you can use the fine-tuned control in the latest browsers and replace it with a simpler effect in others. If you need the same appearance in all browsers, however, you can create something that looks like paint order control with SVG 1.1 code. This post describes why paint-order is useful, how to use it in the latest browsers, and how to fake it in the others.

Read more…

Four short links: 9 November 2015

Four short links: 9 November 2015

Smart Sensors, Learning Autopilot, Higher Education, and 3D Soccer

  1. Low-Power Deep Learning — it’s a media release for proprietary tech, but interesting that people are working on low-power deep learning neural nets. As Pete Warden noted, this kind of research will be at the center of smart sensors. (via Pete Warden)
  2. Tesla’s Self-Improving Autopilot — it learns when you “rescue” (aka take control back from autopilot), so it’s getting better day by day. Musk said that Model S owners could add ~1 million miles of new data every day, which is helping the company create “high-precision maps.” Navteq, Google Maps, Waze … new map data is still valuable.
  3. The Digital Revolution in Higher Education Has Already Happened (Clay Shirky) — and no-one noticed. I read half of this before going “holy crap this is good, who wrote it?” I’m a Shirky junkie (I bet his laundry lists cite Habermas and the Peace of Westphalia). At the current rate of growth, half the country’s undergraduates will have at least one online class on their transcripts by the end of the decade. This is the new normal. But, As long as we discuss online education as a pedagogic revolution rather than an organizational one, we aren’t even having the right kind of conversation. The dramatic adoption of online education is not mainly a change in the content of classes. It’s a change in the institutional form of college, a demand for more flexibility by students who have to manage the increasingly complicated triangle of work, family, and school.
  4. System Automatically Converts 2-D to 3-D (MIT) — hilarious strategy! They constrained their domain: broadcast soccer games. The MIT and QCRI researchers essentially ran this process in reverse. They set the very realistic Microsoft soccer game “FIFA13” to play over and over again, and used Microsoft’s video-game analysis tool PIX to continuously store screen shots of the action. For each screen shot, they also extracted the corresponding 3-D map. […] For every frame of 2-D video of an actual soccer game, the system looks for the 10 or so screen shots in the database that best correspond to it. Then it decomposes all those images, looking for the best matches between smaller regions of the video feed and smaller regions of the screen shots. Once it’s found those matches, it superimposes the depth information from the screen shots on the corresponding sections of the video feed. Finally, it stitches the pieces back together. Brute-forcing soccer. Ok, perhaps “hilarious” for a certain type of person. I am that person.
Four short links: 23 October 2015

Four short links: 23 October 2015

Data Science, Temporal Graph, Biomedical Superstars, and VR Primer

  1. 50 Years of Data Science (PDF) — Because all of science itself will soon become data that can be mined, the imminent revolution in Data Science is not about mere “scaling up,” but instead the emergence of scientific studies of data analysis science-wide.
  2. badwolfa temporal graph store from Google.
  3. Why Biomedical Superstars are Signing on with Google (Nature) — “To go all the way from foundational first principles to execution of vision was the initial draw, and that’s what has continued to keep me here.” Research to retail, at Google scale.
  4. VR Basics — intro to terminology and hardware in the next gen of hardware, in case you’re late to the goldrush^w exciting field.
Four short links: 4 September 2015

Four short links: 4 September 2015

Next President, Robotic Drivers, Vintage Graphics, and Javascript Scheduling

  1. Lessig for President — it’s time.
  2. Is a Cambrian Explosion Coming for Robotics? (PDF) — interesting list of drivers, including wireless tech, battery efficiency, and worldwide data storage.
  3. How Oldschool Graphics Worked (YouTube) — video series on how ’80s computer graphics effects were built. (via BoingBoing)
  4. Tasks, Microtasks, Queues, and Schedules (Jake Archibald) — today’s dose of javascript scheduling headache.

Parallax scrolling for iOS with Swift and Sprite Kit

Learn how to add this popular visual effect to your iOS project.

Up until the mid 1990s, the pinnacle of video game graphics was parallax scrolling: the use of multiple scrolling backgrounds, which created a sense of depth and perspective in the game. When you’re being a 2D game in Sprite Kit, you can create this effect by creating multiple sprites, and managing their position over time.

In this example, we’re creating a scene where there are four components, listed in order of proximity:

  • A dirt path
  • Some nearby hills
  • Some further distant hills
  • The sky

You can see the final scene below:

Read more…

Four short links: 6 August 2015

Four short links: 6 August 2015

Music Money, Hotel Robot, Performance Rating, and SIGGRAPH Papers

  1. Open the Music Industry’s Black Box (NYT) — David Byrne talks about the opacity of financials of streaming and online music services (including/especially YouTube). Caught my eye: The labels also get money from three other sources, all of which are hidden from artists: They get advances from the streaming services, catalog service payments for old songs, and equity in the streaming services themselves. (via BoingBoing)
  2. Savioke — hotel robot. (via Robohub)
  3. Deloitte Changing Performance Reviews (HBR) — “Although it is implicitly assumed that the ratings measure the performance of the ratee, most of what is being measured by the ratings is the unique rating tendencies of the rater. Thus, ratings reveal more about the rater than they do about the ratee.”
  4. SIGGRAPH Papers Are on the Web — collected papers from SIGGRAPH.
Four short links: 18 July 2015

Four short links: 18 July 2015

WebAssembly, Generative Neural Nets, Automated Workplace, and Conversational UIs

  1. WebAssembly (Luke Wagner) — new standard, WebAssembly, that defines a portable, size- and load-time-efficient format and execution model specifically designed to serve as a compilation target for the Web. Being worked on by Mozilla, Google, Microsoft, and Apple.
  2. Inceptionism: Going Deeper into Neural Networks (Google Research) — stunningly gorgeous gallery of images made by using a deep image-classification neural net to make the picture “more.” (So, if the classifier says the pic is of a cat, randomly twiddle pixels until the image classifier says “wow, that matches `cat’ even better!”)
  3. The Automated Workplace (Ben Brown) — What happens if this process is automated using a “bot” in an environment like Slack? — repeat for all business processes. (via Matt Webb)
  4. Conversational UIs (Matt Webb) — a new medium needs a new grammar and conversational UIs are definitely a new medium. As someone whose wedding vows were exchanged on a TinyMUSH, conversational UIs are near and dear to my heart.

The Once and Future SVG

Plugin-free vector graphics are now easier than ever before

spline

Thirteen years ago, in 2001, the World Wide Web Consortium (W3C) finalized the specification for Scalable Vector Graphics, version 1.0. A few months later, in early 2002, O’Reilly published the original SVG Essentials, describing both the basics and the wonderful potential of SVG. An open standard for vector graphics, with support for scripting and animation, was an area of boundless possibility.

From some perspectives, not much has changed. The official SVG specification is still at version 1.1, which was released in 2003 and edited in 2011. Neither update introduced new features to SVG, instead focusing on improving clarity and consistency in the details.

In practice, however, SVG has changed considerably. There are numerous tools for creating SVG, both full-featured graphics programs and online widgets. Most importantly, nearly every web browser out there treats SVG as a first-class citizen (some outdated mobile and Internet Explorer versions being exceptions), displaying SVG as an interactive part of your document with no need for plug-ins.

Read more…

Four short links: 14 August 2014

Four short links: 14 August 2014

Ceramic 3D Printing, Robo Proofs, Microservice Fail, and Amazing Graphics Tweaks

  1. $700 Ceramic-Spitting 3D Printer (Make Magazine) — ceramic printing is super interesting, not least because it doesn’t fill the world with plastic glitchy bobbleheads.
  2. Mathematics in the Age of the Turing Machine (Arxiv) — a survey of mathematical proofs that rely on computer calculations and formal proofs. (via Victoria Stodden)
  3. Failing at Microservices — deconstructed a failed stab at microservices. Category three engineers also presented a significant problem to our implementation. In many cases, these engineers implemented services incorrectly; in one example, an engineer had literally wrapped and hosted one microservice within another because he didn’t understand how the services were supposed to communicate if they were in separate processes (or on separate machines). These engineers also had a tough time understanding how services should be tested, deployed, and monitored because they were so used to the traditional “throw the service over the fence”to an admin approach to deployment. This basically lead to huge amounts of churn and loss of productivity.
  4. Transient Attributes for High-Level Understanding and Editing of Outdoor Scenes — computer vision doing more amazing things: annotate scenes (e.g., sunsets, seasons), train, then be able to adjust images. Tweak how much sunset there is in your pic? Wow.
Four short links: 31 January 2014

Four short links: 31 January 2014

Mobile Libraries, Python Idioms, Graphics Book, and Declining Returns on Aging Link Bait

  1. Bolts — Facebook’s library of small, low-level utility classes in iOS and Android.
  2. Python Idioms (PDF) — useful cheatsheet.
  3. Michael Abrash’s Graphics Programming Black Book — Markdown source in github. Notable for elegance and instructive for those learning to optimise. Coder soul food.
  4. About Link Bait (Anil Dash) — excellent consideration of Upworthy’s distinctive click-provoking headlines, but my eye was caught by we often don’t sound like 2012 Upworthy anymore. Because those tricks are starting to dilute click rates. from Upworthy’s editor-at-large. Attention is a scarce resource, and our brains are very good at filtering.