<p dir="ltr">vtkNamedColors was introduced in VTK 6. For VTK 5 you will have to specify colours using RGB values.</p>
<p dir="ltr">e.g something like:<br>
unsigned char red[3] = {255, 0, 0};<br>
actor->GetProperty()->SetColor(red[0], red[1], red[2]);</p>
<p dir="ltr">Andrew Maclean</p>
<div class="gmail_quote">On 4 Oct 2015 12:35 pm, "Gib Bogle" <<a href="mailto:g.bogle@auckland.ac.nz">g.bogle@auckland.ac.nz</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Hi Piers, Andrew, Cory,<br>
<br>
This does not build with VTK 5.10 (no vtkNamedColors.h). Is there a version that works with 5.10?<br>
<br>
Thanks<br>
Gib<br>
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<hr>
<div style="direction:ltr"><font face="Tahoma" color="#000000" size="2"><b>From:</b> vtkusers [<a href="mailto:vtkusers-bounces@vtk.org" target="_blank">vtkusers-bounces@vtk.org</a>] on behalf of <a href="mailto:piers.barber@logicmonkey.co.uk" target="_blank">piers.barber@logicmonkey.co.uk</a> [<a href="mailto:piers.barber@logicmonkey.co.uk" target="_blank">piers.barber@logicmonkey.co.uk</a>]<br>
<b>Sent:</b> Sunday, 4 October 2015 1:48 p.m.<br>
<b>To:</b> <a href="mailto:andrew.amaclean@gmail.com" target="_blank">andrew.amaclean@gmail.com</a><br>
<b>Cc:</b> vtk<br>
<b>Subject:</b> Re: [vtkusers] Computational Geometry - user equations?<br>
</font><br>
</div>
<div></div>
<div>
<p>Andrew, Cory,</p>
<p>Thanks for the attachment - as a non-coder it bridged the gap between the PDF that I've seen before and what actually needed to be done.</p>
<p>I've attached my trefoil knot code in a zip. The partial derivatives make a big difference to shadows.</p>
<p>I'm on Arch Linux with VTK 6.1.0, and the only change I needed to make to get the example to build was to the CMakeLists.txt - so it picks up OpenGL rather than OpenGL2.</p>
<p>I'm pleased that this works, but the output surface is rather jagged when compared to what I get with MathMod. Any ideas?</p>
<p>For the VTK user list, the zipped files I mention are here:</p>
<p><a href="https://github.com/logicmonkey/curves/tree/master/vtk/TrefoilKnot" target="_blank">https://github.com/logicmonkey/curves/tree/master/vtk/TrefoilKnot</a></p>
<p>( unzip/git pull; cd TrefoilKnot; mkdir build; cd build; cmake ..; make; ./bin/TrefoilKnot )</p>
<p>Thanks again for your help.</p>
<p>--</p>
<p>Piers Barber (-=:LogicMonkey;=-)</p>
<p>On 2015-10-01 00:19, Andrew Maclean wrote:</p>
<blockquote type="cite" style="padding-left:5px;border-left:#1010ff 2px solid;margin-left:5px;width:100%">
<div dir="ltr">If I understand you correctly, then the approach described in <a href="http://www.vtk.org/img/ParametricSurfaces.pdf" target="_blank">http://www.vtk.org/img/ParametricSurfaces.pdf</a>in " How to create your own surface" should work for you. If
you adopt this approach, you just build using the library and you do not need to modify the VTK library.
<div> </div>
<div>I attach a VTK 6.3+ version of the example for you to try out.</div>
<div> </div>
<div>I'll add this to the VTK examples sometime next week.</div>
<div> </div>
<div>Once you get a surface you might like to look at:</div>
<div><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/ElevationBandsWithGlyphs" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/ElevationBandsWithGlyphs</a></div>
<div>and</div>
<div><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CurvatureBandsWithGlyphs" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CurvatureBandsWithGlyphs</a></div>
<div>for some visualisation ideas.</div>
<div> </div>
<div> </div>
<div>Regards</div>
<div> Andrew</div>
<div><br>
<div class="gmail_extra"><br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:#cccccc;border-left-style:solid;padding-left:1ex">
<br>
---------- Forwarded message ----------<br>
From: Cory Quammen <<a href="mailto:cory.quammen@kitware.com" target="_blank">cory.quammen@kitware.com</a>><br>
To: <a href="mailto:piers.barber@logicmonkey.co.uk" target="_blank">piers.barber@logicmonkey.co.uk</a><br>
Cc: "<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>" <<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>><br>
Date: Wed, 30 Sep 2015 09:15:45 -0400<br>
Subject: Re: [vtkusers] Computational Geometry - user equations?<br>
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Tue, Sep 29, 2015 at 12:13 PM, <span><<a href="mailto:piers.barber@logicmonkey.co.uk" target="_blank">piers.barber@logicmonkey.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:#cccccc;border-left-style:solid;padding-left:1ex">
Hi All,<br>
<br>
I'd like to specify a surface f(u,v) in 3D with my own parametric equation system {x(u,v), y(u,v), z(u,v)}. And then visualize it.<br>
<br>
The only way I can see to do this is to add my function to the library source code, build the library and then call my function as described here:<br>
<br>
<a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/ParametricObjectsDemo#CMakeLists.txt" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/ParametricObjectsDemo#CMakeLists.txt</a></blockquote>
<div> </div>
<div>Yep, that looks like a good way to go.</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:#cccccc;border-left-style:solid;padding-left:1ex">
I'm using vtkParametricTorus[.h, .cxx] as a template, but is there an easier and more direct way to do this?</blockquote>
<div> </div>
<div>You can define your subclass of vtkParametricFunction in your local project - no need to add it to VTK, which is what I think you were saying above.</div>
<div> </div>
<div>Were you looking for a vtkParametricFunction subclass that takes an expression for x(u,v), etc.? That doesn't exist as far as I know, but that would be cool to have.</div>
<div> </div>
<div>Cory</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:#cccccc;border-left-style:solid;padding-left:1ex">
Thanks!<br>
<br>
-=:LM:=-<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" target="_blank">
http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a></blockquote>
</div>
<br>
<br clear="all">
<div> </div>
-- <br>
<div>Cory Quammen<br>
R&D Engineer<br>
Kitware, Inc.</div>
</div>
</div>
<br>
<br>
</blockquote>
</div>
-- <br>
<div>___________________________________________<br>
Andrew J. P. Maclean<br>
<br>
___________________________________________</div>
</div>
</div>
</div>
</blockquote>
<p> </p>
<div> </div>
</div>
</div>
</div>
</div>
</blockquote></div>