Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to make the gradient color to follow the pipe curve below rather than to span from the left to the right.

The following MWE shows the default behavior which is not what I'm looking for.

\documentclass[pstricks,border=12pt]{standalone}

\usepackage{pst-slpe} 

\begin{document}

\begin{pspicture}(8,-7)
\pscustom[fillstyle=slope]{
  \psline(6,0)
  \psarcn(6,-2){2}{90}{-90}
  \psline(2,-4)
  \psarc(2,-5){1}{90}{-90}
  \psline(8,-6)
  \psline(8,-7)(2,-7)
  \psarcn(2,-5){2}{-90}{90}
  \psline(6,-3)
  \psarc(6,-2){1}{-90}{90}
  \psline(0,-1)
  \closepath}
\end{pspicture}

\end{document}

enter image description here

Could you help me to accomplish my objective?

P.S. The color should be {rgb:orange,0;black,100} at one end and {rgb:orange,80;black,20} at the other.

share|improve this question
    
@StiffJokes I don't think so (but maybe I'm using it in the wrong place). If this problem is solved, I still can't figure out how to get a smooth colour gradient throughout the entire pipe (with slopebegin = {rgb:orange,0;black,100}, slopeend = {rgb:orange,80;black,20},). –  Svend Tveskæg Dec 22 '13 at 9:08
    
@StiffJokes Yes. The black end should have the colour {rgb:orange,0;black,100} (i.e., black, as it is now) and the other end (where the pipe is coming out of the furnace and the lower right part of it) should have the colour {rgb:orange,80;black,20}. –  Svend Tveskæg Dec 22 '13 at 9:15
    
@StiffJokes I have come to the same conclusion. :) –  Svend Tveskæg Dec 22 '13 at 9:20
    
@SvendTveskæg: draw a line instead of rectangles, use the optional argument of linearc and have a look at tug.org/PSTricks/main.cgi?file=Examples/Colors/colors#contColor –  Herbert Dec 22 '13 at 9:41
    
@Herbert I have now looked at the examples on the PSTricks page and I can't really figure out how to use it. Can I make you give an answer? –  Svend Tveskæg Dec 22 '13 at 14:48
show 1 more comment

1 Answer

Well, guys, this is it, even with a jump...

mwe

%! *latex mal-paths.tex
% All Fools' Day!
% I will do some more experiments, polishing of the code and 
%   commenting it and I'll be back to post it all here, eventually...
%   But it is one big chaos in typesetting, I can say that for sure!
share|improve this answer
1  
This looks really good. I'm really looking forward to the code. (P.S. I hope it's not a Fools' Day prank. :-) ) –  Svend Tveskæg Apr 2 at 15:17
1  
I'd like to see the code soon, or I'm calling this a bad April Fool's joke... :-) Was the code created using magical unicoin powers? –  Paul Gessler Apr 2 at 22:37
    
It is rather black magic... ;-) I will post all my experiments as usual (I am trying some different scenarios on this topic, I dislike my present state -- it is slow and it doesn't work with straight lines), but I've posted this picture in the middle of work due to April 1, so I am still working on it... –  Malipivo Apr 3 at 5:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.