postscript

How to “trap” my surface patches to prevent the background from bleeding through the cracks?

泄露秘密 提交于 2019-12-02 22:31:13
问题 In response to a challenge in comp.lang.postscript, I'm working-up my 3D chops trying to render a cylinder as projected rectangular patches. But I'm still seeing the wire-frame even after I comment-out the line-drawing, because the patches don't butt-up flush. The cylinder is modeled along the z-axis by double-looping over z (-2 .. 2, step 4/N) and theta (0 .. 360, step 360/N). The four points of the rectangle are: v1 = (R cos T, R sin T, z) v4 = (R cos T, R sin T, z+dz) v2 = (R cos (T+dT), R

Get rid of gray line in R density plot density at y = 0

烂漫一生 提交于 2019-12-02 12:16:22
问题 I have a density plot that I want to save in an eps file. My density plot is something like setEPS() postscript("myfile.eps") plot(density(rnorm(1000))) dev.off() just with my data and a little bit more complex (changing labels and margins, more lines on top of it, etc). My problem is that I get an annoying, horizontal thin gray line on top of my density plot at y = 0, and I'd like to get rid of it. When plotting directly to the X device I don't get this horizontal gray line, but in

Is it possible to get argv[0] in postscript?

孤者浪人 提交于 2019-12-02 11:09:31
问题 I was wondering if it is possible to get argv[0] in postscript. For example, I want to be able to print the postscript file's name. If I name the postscript file 1.ps then it will print out 1 and if I name it 2.ps it will print out 2 and so on. 回答1: This is not possible with Postscript in general. Many postscript environments, like in a printer, will not have a filesystem or filenames at all. A file in the general sense is just an abstraction for accessing a sequence of bytes one at a time.

How to “trap” my surface patches to prevent the background from bleeding through the cracks?

随声附和 提交于 2019-12-02 09:14:47
In response to a challenge in comp.lang.postscript, I'm working-up my 3D chops trying to render a cylinder as projected rectangular patches. But I'm still seeing the wire-frame even after I comment-out the line-drawing, because the patches don't butt-up flush. The cylinder is modeled along the z-axis by double-looping over z (-2 .. 2, step 4/N) and theta (0 .. 360, step 360/N). The four points of the rectangle are: v1 = (R cos T, R sin T, z) v4 = (R cos T, R sin T, z+dz) v2 = (R cos (T+dT), R sin (T+dt), z) v3 = (R cos (T+dT), R sin (T+dt), z+dz) Then we apply a model->world rotation to all

itextsharp postscript to PDF

心已入冬 提交于 2019-12-02 09:11:20
问题 Is it possible to use itextsharp to convert postscript to a PDF ? If not is there another way to do it in .net ? 回答1: Converting PostScript to PDF is called "distilling". iText and iTextSharp do not support distilling. Ghostscript will be your only FOSS solution. 回答2: You could use Ghostscript as it's explained here: http://hi.baidu.com/lqyidxa_igfv/blog/item/df2037b394539fa0d9335a94.html 来源: https://stackoverflow.com/questions/4970511/itextsharp-postscript-to-pdf

Is it possible to get argv[0] in postscript?

邮差的信 提交于 2019-12-02 07:49:29
I was wondering if it is possible to get argv[0] in postscript. For example, I want to be able to print the postscript file's name. If I name the postscript file 1.ps then it will print out 1 and if I name it 2.ps it will print out 2 and so on. This is not possible with Postscript in general. Many postscript environments, like in a printer, will not have a filesystem or filenames at all. A file in the general sense is just an abstraction for accessing a sequence of bytes one at a time. The Ghostscript interpreter implements an extension which may enable you to do what you want. <file>

Create a tiff with only text and no images from a postscript file with ghostscript

蹲街弑〆低调 提交于 2019-12-02 06:48:26
Is it possible to create a tiff file from a postscript-file (created from a pdf-document with readable text and images) into a tiff file without the images and only the text? Like add a maxbuffer so images will be removed and only text remaining? And if boxes and lines around text could be removed as well that would be awesome. Best regards! KenS You can redefine the various 'image' operators so that they don't do anything: /image { type /dicttype eq not { % uses up argument, only one if dict form pop pop pop pop % remove the arguments for the non-dictionary form. } ifelse } bind def

itextsharp postscript to PDF

不想你离开。 提交于 2019-12-02 06:24:20
Is it possible to use itextsharp to convert postscript to a PDF ? If not is there another way to do it in .net ? Converting PostScript to PDF is called "distilling". iText and iTextSharp do not support distilling. Ghostscript will be your only FOSS solution. You could use Ghostscript as it's explained here: http://hi.baidu.com/lqyidxa_igfv/blog/item/df2037b394539fa0d9335a94.html 来源: https://stackoverflow.com/questions/4970511/itextsharp-postscript-to-pdf

Ghostscript - PS to PDF - Inverted images problem

淺唱寂寞╮ 提交于 2019-12-02 05:55:32
问题 I'm trying to convert postscript to PDF using Ghostscript. Everything is converted ok except in some cases images are for some reason inverted. Reported bug info: http://bugs.ghostscript.com/show_bug.cgi?id=691759 Now, they say that this bug was fixed. I downloaded ghostscript 8.70, 8.71, 9.00 and tryed all three versions and result is a same. GSView shows postscript as it should be and does not invert the images. Anyone has any idea? 回答1: Well, reading the comment no. 4 for GS bug 691759 it

Understanding recursive Koch Snowflake function in Postscript

十年热恋 提交于 2019-12-02 04:29:01
问题 I have followiong program in PostScript which I am having difficutly in understanding. /kochR { 2 copy ge {dup 0 rlineto} { 3 div 2 copy kochR 60 rotate 2 copy kochR -120 rotate 2 copy kochR 60 rotate 2 copy kochR } ifelse pop pop } def 0 0 moveto 27 81 kochR 0 27 moveto 9 81 kochR 0 54 moveto 3 81 kochR 0 81 moveto 1 81 kochR stroke My questions on above program are: What does 2 copy ge { dup 0 rlineto } mean here? How does ifelse work here and what is the condition? What does 3 div do here?