Comments (3)
Hi!
By design this program is for randomly generated fishes. However with a bit of hacking, you can draw a custom fish, e.g. by directly passing params to the fish()
function, importable from fishdraw.js
, like so:
const {fish,reframe,cleanup,draw_svg} = require('./fishdraw.js');
let my_params = {
body_curve_type:0,
body_curve_amount:0.85,
body_length:350,
body_height:90,
scale_type:1,
scale_scale:1,
pattern_type:3,
pattern_scale:1,
dorsal_texture_type:1,
dorsal_type:0,
dorsal_length:100,
dorsal_start:8,
dorsal_end:27,
wing_texture_type:0,
wing_type:0,
wing_start:6,
wing_end:6,
wing_y:0.7,
wing_length:130,
wing_width:10,
pelvic_start:9,
pelvic_end:14,
pelvic_length:85,
pelvic_type:0,
pelvic_texture_type:0,
anal_start:19,
anal_end:29,
anal_length:50,
anal_type:0,
anal_texture_type:0,
tail_type:0,
tail_length:75,
finlet_type:0,
neck_type:0,
nose_height:0,
mouth_size:8,
head_length:30,
head_texture_amount:60,
has_moustache:1,
moustache_length:10,
has_beard:0,
has_teeth:1,
teeth_length:8,
teeth_space:3.5,
beard_length:30,
eye_type:1,
eye_size:10,
jaw_size:1,
jaw_open:1,
};
let polylines = fish(my_params);
fs.writeFileSync("out.svg",draw_svg(cleanup(reframe(polylines, 20, 'My fish name.'))));
By tweaking these a bit you can figure out the params for your favorite fish.
See the generate_params() function for recommended ranges for each param.
Note that some fish species might not be representable with this system, and passing "bad" params might produce weird results or crash the program.
Good luck ;)
from fishdraw.
Thank you very much for your prompt reply !
from fishdraw.
TypeError: Cannot read property 'writeFileSync' of undefined
const fs = require('fs');
from fishdraw.
Related Issues (3)
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 fishdraw.