Drawing parametric curves

42 views
Skip to first unread message

julianibarz

unread,
Aug 19, 2009, 9:49:12 PM8/19/09
to Sketch Users
Hi,

I would like to know if sketch permits to draw easily Hermite, Bezier,
B-Spline or Nurbs curves ? If yes is there a sample or something
anywhere ?

Thanks

Gene

unread,
Aug 20, 2009, 2:41:46 PM8/20/09
to Sketch Users
Hello,

Version 2 will; not the current one. I designed Sketch under the
assumption that complex objects would be created by separate systems
or programs, with Sketch taking care of object positioning, hidden
surface removal, and labeling only. The main reason I wrote Sketch
was to accurately position LaTeX math within 3d figures. In addition,
I only needed ruled polygons and straight lines as primitives, so
that's all that's been implemented. Since there have been so many
requests for Sketch to include a general purpose programming
capability, smooth surfaces, curves, and a lighting model, I'm looking
at these for the future. Don't hold your breath, however. Time
available to work on the new version is very limited.

Take care
Gene Ressler

julianibarz

unread,
Aug 20, 2009, 6:39:57 PM8/20/09
to Sketch Users
> Version 2 will; not the current one.  I designed Sketch under the
> assumption that complex objects would be created by separate systems
> or programs, with Sketch taking care of object positioning, hidden
> surface removal, and labeling only.

Ok so know let assume I have a program that compute an hermite curve
by giving him the control points and the number of points I want and
print to the standard output. How can I integrate that into a sketch
file ? What I would like is kind of :

sketch file :
#some sketch commands
h1 = exec(hermite.exe [parameters sent to the program])
#some other sketch commands

and this exec command is replaced by the output of hermite.exe program
and to draw my hermite h1 is considered to be a list of points. Sorry
if my question is trivial.

Regards,
Julian

Gene

unread,
Aug 21, 2009, 11:20:35 PM8/21/09
to Sketch Users
Exec would be machine-dependent. Sketch is a simple text processor
that compiles on many different machines with no dependencies at all.
It's going to stay that way.

Just write your Hermite interpolation code to print sketch
statements. Then you can use the input statement (manual section 3.1)
to include the statements your program writes. Use a makefile or a
little shell script or batch program to run both commands.

All the best,
Gene


Kjell Magne Fauske

unread,
Aug 23, 2009, 2:05:55 PM8/23/09
to sketch...@googlegroups.com

If you are familiar with Blender you can try my Blender to Sketch exporter:
http://www.fauskes.net/code/blend2sketch/documentation/
The documentation is a bit out of date.
The latest development version can be found here:
http://code.google.com/p/blenderscripts/source/browse/trunk/scripts/sketch_export.py

The script can generate Sketch code for curves, but the curves are
converted to polylines first.

- Kjell Magne Fauske

Julian Ibarz

unread,
Aug 24, 2009, 1:25:27 PM8/24/09
to sketch...@googlegroups.com
> Just write your Hermite interpolation code to print sketch
> statements. Then you can use the input statement (manual section 3.1)
> to include the statements your program writes.

This is the kind of thing I wanted, thank you for the information.

For the blender exporter : it is really nice but I actually don't need
it. Maybe in the future.

Thank you all,

2009/8/21 Gene <gene.r...@gmail.com>:
--
Julian Ibarz
Web site (In French) : http://julian-ibarz.developpez.com
Reply all
Reply to author
Forward
0 new messages