I understand why you can't see an immediate benefit of creating Sketch
2. I have barely tried Asymptote, but it looks like it has most of the
missing features of Sketch. However, my initial impression of
Asymptote is that it is a bit slow and I don't like the style of the
default arrow heads;-) What I like about Sketch is:
- its simplicity
- designed primarily for 3D
- it outputs tikz/pstricks code that is easy to modify and postprocess
- I like the look and feel of the generated graphics
I have to admit that for my latest Sketch drawings I have used my
Blender2Sketch exporter because it is faster to set up a scene this
way. I therefore don't use much of Sketch's advanced language
features. What I miss is curved paths and surfaces, and some sort of
shading.
My comments are probably not very useful. I will experiment some more
with Asymptote and see how it compares to Sketch. Hopefully I can give
some better feedback then. I will probably also modify my Blender
exporter so that it can output Asymptote code as well.
- Kjell Magne Fauske
I'm glad to see you weigh in (and investigate) because one of the things
I wonder about asymptote is how easy it is to nake examples like
http://www.fauskes.net/nb/introduction-to-sketch/
I realize we are talking about sketch2, but this somehow affects the
long term plans for sketch1 as well.
All the best.
David
I like Sketch because it is simple and small, although I have been
using Asymptote lately because of the capability of including 3D PRC
objects in PDF.
Having said that, I find Asymptote quite slow and big and it does not
a good job at rendering 3D scenes to vector 2D format. Raster 2D
projection has it problems too, depends on display rendering, openGL.
I am not sure how difficult could be to implement 3D PRC output in
Sketch but it would be the coolest thing. If Sketch can generate a 3D
PRC *and* the 2D vector preview I will be very happy.
Second, (I requested this to the Asymptote developer also), if you can
provide a "Sketch C++ library" to generate drawings from a C++
program, that will be game changer. You may say "but I have to give up
this nice Sketch programming language"; ie. Sketch defines its own
language with some language specification (in YACCs or Bison, I don't
remember ).
Did you hear about Boost.Proto and Boost.Spirit? you can define a
minilanguage in C++ that approaches your original language. That is
you can write C++ code that because of operator overloading, etc can
resemble sketch code and generate directly the output for the C++
program compiled with the "Sketch library".
for example, the following is valid C++ syntax that can be tricked (by
Boost.Proto) into performing the semantic actions of the sketch
program but without the sketch executable:
int main(){
sketch::scene s("tikzoutput");
using namespace sketch;
s << polygon[ map("fillcolor", lightgray)("linewidth", 3*pt)](0,0,1)
(1,0,0)(0,1,0)
<< line[map("linestyle",dotted)](-1,-1,-1)(2,2,2);
s.save("hello.tikz"); // or s.save("hello.ps");
}
Note that the previous is valid C++ with semantic actions that will be
defined with the help of Boost.Proto.
The code can be a simple translation of your YACC grammars. More info
at http://cpp-next.com/
Just ideas,
Alfredo