<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Thanks for your help, Andrew.<br>
I did this:<br>
#find_package(VTK COMPONENTS<br>
#  vtkCommonColor<br>
#  vtkCommonCore<br>
#  vtkFiltersHybrid<br>
#  vtkFiltersSources<br>
#  vtkIOImage<br>
#  vtkInteractionStyle<br>
#  vtkRenderingOpenGL<br>
#)<br>
find_package(VTK REQUIRED)<br>
but unfortunately the list of errors looks much the same.<br>
<br>
Cheers<br>
Gib<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF490444"><font face="Tahoma" color="#000000" size="2"><b>From:</b> Andrew Maclean [andrew.amaclean@gmail.com]<br>
<b>Sent:</b> Sunday, 4 October 2015 3:32 p.m.<br>
<b>To:</b> Gib Bogle<br>
<b>Cc:</b> vtk; logicmonkeyuk<br>
<b>Subject:</b> RE: [vtkusers] Computational Geometry - user equations?<br>
</font><br>
</div>
<div></div>
<div>
<p dir="ltr">VT6 is modular in contrast to VTK 5 so I would replace the section in the CMakeLists.txt file dealing with including  the modules with something like this:</p>
<p dir="ltr">find_package(VTK REQUIRED)<br>
include(${VTK_USE_FILE})</p>
<p dir="ltr">I hope this helps.</p>
<p dir="ltr">Andrew Maclean</p>
<div class="gmail_quote">On 4 Oct 2015 1:01 pm, "Gib Bogle" <<a href="mailto:g.bogle@auckland.ac.nz" target="_blank">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">That was easily circumvented, but turned out to be the least of the problems:<br>
<br>
2>TrefoilKnot.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: __thiscall vtkParametricFunction::vtkParametricFunction(void)" (__imp_??0vtkParametricFunction@@IAE@XZ) referenced in function "protected: __thiscall myParametricTrefoilKnot::myParametricTrefoilKnot(void)"
 (??0myParametricTrefoilKnot@@IAE@XZ)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObjectBase::Delete(void)" (?Delete@vtkObjectBase@@UAEXXZ)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObjectBase::FastDelete(void)" (?FastDelete@vtkObjectBase@@UAEXXZ)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObjectBase::PrintHeader(class std::basic_ostream<char,struct std::char_traits<char> > &,class vtkIndent)" (?PrintHeader@vtkObjectBase@@UAEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@VvtkIndent@@@Z)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObjectBase::PrintTrailer(class std::basic_ostream<char,struct std::char_traits<char> > &,class vtkIndent)" (?PrintTrailer@vtkObjectBase@@UAEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@VvtkIndent@@@Z)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObjectBase::Register(class vtkObjectBase *)" (?Register@vtkObjectBase@@UAEXPAV1@@Z)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObjectBase::UnRegister(class vtkObjectBase *)" (?UnRegister@vtkObjectBase@@UAEXPAV1@@Z)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall myParametricTrefoilKnot::CollectRevisions(class std::basic_ostream<char,struct std::char_traits<char> > &)" (?CollectRevisions@myParametricTrefoilKnot@@MAEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall vtkObject::RegisterInternal(class vtkObjectBase *,int)" (?RegisterInternal@vtkObject@@MAEXPAVvtkObjectBase@@H@Z)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall vtkObject::UnRegisterInternal(class vtkObjectBase *,int)" (?UnRegisterInternal@vtkObject@@MAEXPAVvtkObjectBase@@H@Z)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall vtkObjectBase::ReportReferences(class vtkGarbageCollector *)" (?ReportReferences@vtkObjectBase@@MAEXPAVvtkGarbageCollector@@@Z)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::DebugOn(void)" (?DebugOn@vtkObject@@UAEXXZ)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::DebugOff(void)" (?DebugOff@vtkObject@@UAEXXZ)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::Modified(void)" (?Modified@vtkObject@@UAEXXZ)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual unsigned long __thiscall vtkObject::GetMTime(void)" (?GetMTime@vtkObject@@UAEKXZ)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMinimumU(double)" (?SetMinimumU@vtkParametricFunction@@UAEXN@Z)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMinimumU(void)" (?GetMinimumU@vtkParametricFunction@@UAENXZ)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMaximumU(double)" (?SetMaximumU@vtkParametricFunction@@UAEXN@Z)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMaximumU(void)" (?GetMaximumU@vtkParametricFunction@@UAENXZ)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMinimumV(double)" (?SetMinimumV@vtkParametricFunction@@UAEXN@Z)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMinimumV(void)" (?GetMinimumV@vtkParametricFunction@@UAENXZ)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMaximumV(double)" (?SetMaximumV@vtkParametricFunction@@UAEXN@Z)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMaximumV(void)" (?GetMaximumV@vtkParametricFunction@@UAENXZ)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMinimumW(double)" (?SetMinimumW@vtkParametricFunction@@UAEXN@Z)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMinimumW(void)" (?GetMinimumW@vtkParametricFunction@@UAENXZ)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMaximumW(double)" (?SetMaximumW@vtkParametricFunction@@UAEXN@Z)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMaximumW(void)" (?GetMaximumW@vtkParametricFunction@@UAENXZ)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetJoinU(int)" (?SetJoinU@vtkParametricFunction@@UAEXH@Z)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall vtkParametricFunction::GetJoinU(void)" (?GetJoinU@vtkParametricFunction@@UAEHXZ)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::JoinUOn(void)" (?JoinUOn@vtkParametricFunction@@UAEXXZ)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::JoinUOff(void)" (?JoinUOff@vtkParametricFunction@@UAEXXZ)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetJoinV(int)" (?SetJoinV@vtkParametricFunction@@UAEXH@Z)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall vtkParametricFunction::GetJoinV(void)" (?GetJoinV@vtkParametricFunction@@UAEHXZ)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::JoinVOn(void)" (?JoinVOn@vtkParametricFunction@@UAEXXZ)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::JoinVOff(void)" (?JoinVOff@vtkParametricFunction@@UAEXXZ)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetTwistU(int)" (?SetTwistU@vtkParametricFunction@@UAEXH@Z)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall vtkParametricFunction::GetTwistU(void)" (?GetTwistU@vtkParametricFunction@@UAEHXZ)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::TwistUOn(void)" (?TwistUOn@vtkParametricFunction@@UAEXXZ)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::TwistUOff(void)" (?TwistUOff@vtkParametricFunction@@UAEXXZ)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetTwistV(int)" (?SetTwistV@vtkParametricFunction@@UAEXH@Z)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall vtkParametricFunction::GetTwistV(void)" (?GetTwistV@vtkParametricFunction@@UAEHXZ)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::TwistVOn(void)" (?TwistVOn@vtkParametricFunction@@UAEXXZ)<br>
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::TwistVOff(void)" (?TwistVOff@vtkParametricFunction@@UAEXXZ)<br>
etc. etc.<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> Andrew Maclean [<a href="mailto:andrew.amaclean@gmail.com" target="_blank">andrew.amaclean@gmail.com</a>]<br>
<b>Sent:</b> Sunday, 4 October 2015 2:53 p.m.<br>
<b>To:</b> Gib Bogle<br>
<b>Cc:</b> vtk; logicmonkeyuk<br>
<b>Subject:</b> RE: [vtkusers] Computational Geometry - user equations?<br>
</font><br>
</div>
<div></div>
<div>
<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" target="_blank">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>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</body>
</html>