devankestel / hilldown Goto Github PK
View Code? Open in Web Editor NEWHilldown
Hilldown
Use asdf to maintain versions on this project. https://asdf-vm.com/#/core-configuration
Draw a solid, horizontal line along the bottom of the hill. Draw a dotted line from the peak of the hill to the bottom line.
Create a method for adding a label to each dot. It should take the coordinates of the dot as an (x, y) pair and an orientation of where the text should be placed in relation to the dot. e.g. above, below, left, right.
Example with drawSVG library.
# Create hyperlink
hlink = Hyperlink('https://www.python.org', target='_blank',
transform='skewY(-30)')
# Add child elements
hlink.append(draw.Circle(0,0,0.5, fill='green'))
hlink.append(draw.Text('Hyperlink',0.2, 0,0, center=0.6, fill='white'))
Using the drawSVG library create an instance method which draws a path segment. Here is an example path using the library:
p = draw.Path(stroke_width=2, stroke='green',
fill='black', fill_opacity=0.5)
p.M(-30,5) # Start path at point (-30, 5)
p.l(60,30) # Draw line to (60, 30)
p.h(-70) # Draw horizontal line to x=-70
p.Z() # Draw line to start
d.append(p)
Add metadata to each point along the hill as to what phase it belongs to - e.g. Unstarted, Up Low, Up High, Top, Down High, Down Low, Finished.
Parse the curve information from the starting SVG and create an array of 101 pairs [(x, y)] that comprise the curve. Each pair will represent a % along the curve from 0-100. These will be used for future dot placement.
Instead of generating hill coordinates, use a starting SVG and draw by adding over top of it.
This method takes in an array of (x, y) pairs draws a path from them. It will be helpful to call the method which draws path segments in the implementation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.