TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: G9.js – Automatically Interactive Differentiable Graphics

237 点作者 bijection超过 8 年前

10 条评论

trishume超过 8 年前
This apparently uses the back-propagation engine from <a href="https:&#x2F;&#x2F;alpha.trycarbide.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;alpha.trycarbide.com&#x2F;</a> (which the author of g9 also works on). When I saw it I thought I remembered seeing it in the Carbide demo, so I Googled and I was right. Super neat that it&#x27;s packaged up into a library though. Really cool system.<p>See <a href="https:&#x2F;&#x2F;twitter.com&#x2F;antimatter15&#x2F;status&#x2F;779776900042555393" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;antimatter15&#x2F;status&#x2F;779776900042555393</a>
bijection超过 8 年前
Hey HN, I&#x27;m the author of this library, happy to answer any questions!<p>We just fixed a bug that was breaking this on mobile, everything should be working now.
评论 #12573069 未加载
评论 #12574062 未加载
评论 #12572958 未加载
评论 #12576257 未加载
emmelaich超过 8 年前
Could someone please make a Visio clone out of this that produced Graphviz code? You would make me blissfully happy.<p>Graphviz is too hard for my colleagues and I cannot face labouring over Visio just to produce something that is not diffable.
DonHopkins超过 8 年前
That is a neat idea! It reminds me of another cool constraint based animation system called &quot;Embedded Constraint Graphics&quot; that Tom Ngo developed at Interval Research Corporation, for which he filed a patent on Aug 6, 1996.<p>So hey, didn&#x27;t that patent just expire a month ago?<p>Golan Levin used the ECG graphical editor to create the vector based face cartoons for his &quot;Mouther&quot; project, by simply dragging the eyes and mouth and other features around like you&#x27;d naturally want to be able to do. [2]<p>It&#x27;s a really brilliant way to automatically create directly manipulatable interactive graphics from target examples, which you can interpolate between along multiple dimensions at once (zones of a simplicial complex [3]), by dragging different parts of the graphics appropriately. It would figure out how to map the direction and amount you&#x27;re dragging at a particular location, to appropriate movement in the n-dimensional target interpolation space. It was great for making cartoony direct manipulation user interface widgets!<p>&quot;A constraint-based graphics system employs different examples of an image to define the constraints of the system. The examples are grouped into subsets which can be interpolated with one another, according to a user-specified input that determines the relative proportion of each example image. An animation can be created by defining a sequence of such interpolated images. Alternatively, a user can directly manipulate observable components of an image to define a particular state for the image. Automatic transformations are defined to provide registration of an image within an overall scene by shifting the frame of reference for an image so that unnatural movements do not occur as the animation proceeds through a sequence of states. The structure of the system permits an animation to be divided into distinct components that can be combined with complementary components of other animations, to provide new results. These components include a clip motion which defines a sequence of states, a clip character which applies the clip motion to a particular image configuration, and clip art.&quot;<p>&quot;The various image examples can be associated with one another in a manner that defines a topological data structure which identifies their relationships. An example of such a data structure for the images of FIGS. 2A-2D is shown in FIG. 3. Referring thereto, each of the four image examples is associated with a vertex of a geometric shape. Specifically, the three image examples of FIGS. 2A, 2B, and 2C, which form one subset, define a triangular shape. The second subset, comprising the examples of FIGS. 2A, 2B, and 2D, defines a second triangle. Since the examples of FIGS. 2A and 2B are shared between the two subsets, the two triangles are joined along a common interface. Each subset of examples constitutes a simplex, or zone, and all of the zones together form a combinatorial structure, or state space, known as a simplicial complex. In the case illustrated in FIG. 5, the state space is composed of two triangular zones, ABC and ABD. While both zones in this case are two-dimensional structures, it is also possible for a state space to include one-dimensional zones, i.e. a line whose end points are defined by two examples, as well as multi-dimensional zones such as a tetrahedron defined by four examples.&quot;<p>&quot;The combinatorial structure defines a state space for the graphics system. Any given point within this space defines a particular image, and movement within the state space causes the appearance of the image to change. More particularly, each of the vertices corresponds to one of the image examples shown in FIGS. 2A-2D. A point located between two vertices results in an interpolated image comprised of a representative portion of each of the two images associated with the respective vertices. Thus, as one moves from the lowest vertex A in the structure of FIG. 3 up the vertical line 10 to the highest vertex B, the figure&#x27;s arms smoothly move from the position shown in FIG. 2A to that shown in FIG. 2B. Movement from the lowest vertex A to the left vertex C causes a transition in the image from that of FIG. 2A to that of FIG. 2C. A point located somewhere within the triangle defined by the three vertices A, B and C corresponds to an image in which the arms are partially raised and the right leg is partially lifted. For example, the point 12 represents a position in which the image is a weighted composite consisting of 60% of FIG. 2B, 30% of FIG. 2A and 10% of FIG. 2C. The percentages sum up to unity, and the weight values which correspond to these percentages, i.e. 0.6, 0.3 and 0.1, constitute a vector in barycentric coordinates. In a relatively simple embodiment of the invention, the examples are interpolated linearly; but in a different embodiment, the interpolation could employ non-linear functions, such as cubic polynomials. Any state s within the state space can be specified by a zone, in this case the zone containing the examples A, B and C, together with the vector, i.e. 0.3, 0.6, 0.1!.&quot;<p>[1] <a href="https:&#x2F;&#x2F;www.google.com&#x2F;patents&#x2F;US5933150" rel="nofollow">https:&#x2F;&#x2F;www.google.com&#x2F;patents&#x2F;US5933150</a><p>[2] <a href="http:&#x2F;&#x2F;www.flong.com&#x2F;projects&#x2F;mouther&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.flong.com&#x2F;projects&#x2F;mouther&#x2F;</a><p>[3] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Simplicial_complex" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Simplicial_complex</a>
评论 #12572752 未加载
评论 #12572713 未加载
stuaxo超过 8 年前
I guess the code is supposed to update when I drag the graphics?<p>But nothing happens for me on firefox [Ubuntu, 64 bit].<p>This does look great, and I&#x27;ve been wanting to build something like this into a livecoding app for ages, but had no idea how it would work - now, thanks to the comment about backpropagation on this page, I do :)
评论 #12582265 未加载
macawfish超过 8 年前
please, like I&#x27;m 5, someone explain?
评论 #12573446 未加载
goblin89超过 8 年前
Anyone knows of a library that somehow black-boxes &#x2F; abstracts away the manual calculus involved in such visualizations? I imagine that’d greatly lower barrier to entry to creation of stunning graphics and animations, and with the help of G9.js even more so.
macca321超过 8 年前
Very cool! Lots of questions!<p>Could this be used for inverse kinematics?<p>Would this approach work in 3d?<p>Could you use it for reverse model binding with DOM elements?
d0100超过 8 年前
What&#x27;s the license?
评论 #12573682 未加载
javajosh超过 8 年前
IMHO this link is infinitely more inspirational. <a href="http:&#x2F;&#x2F;omrelli.ug&#x2F;g9&#x2F;gallery&#x2F;" rel="nofollow">http:&#x2F;&#x2F;omrelli.ug&#x2F;g9&#x2F;gallery&#x2F;</a>
评论 #12572725 未加载