Comments (2)
Like
diagram "s1" {
background square="1"
square x=.5 y=.5
}
diagram "s2" {
background square="2"
square x=.5 y=1.5
square x=1.5 y=1.5
}
...
square
nodes can also have a rotate
attribute giving an angle. Probably a color
too, since some examples have more than just the gray.
When we get to the non-trivial container shapes (like circle-in-L or whatever) the background
node can have a path
attribute instead.
We auto-calculate the canvas size based on the background and set up the viewport automatically.
from efmath.
Got a response from Erich on the details of some of the odder square placements:
let's start with squares in squares. the easy ones are the ones where all the tilted squares are 45 degrees. i'm sure you can figure out those on your own. that handles n=5, 10, 26, 27, 28, 38, 40, 52, 65, 66, 67, 82, 83, 84, 87, 89.
the next hard one is n=11. the 5 tilted squares are rotated 40.182 degrees and have corners (2.02,.985), (1.34,1.72), (2.68,1.73), (2.00,2.465), and (3.23,.85). that isn't quite 3 decimal places.
the last one for today is n=17. there are 6 tilted squares rotated .6947 radians, and have corners
(2.4,2.59),(1.67,1.91),(3.09,1.86),(2.36,1.18),(.78,1.27),(1.51,.59)
the last tilted square is rotated .9316 radians and has corner (3.14,.60). only 2 decimal places.
from efmath.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from efmath.