[vtkusers] Computational Geometry - user equations?

Gib Bogle g.bogle at auckland.ac.nz
Sat Oct 3 22:01:04 EDT 2015


That was easily circumvented, but turned out to be the least of the problems:

2>TrefoilKnot.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: __thiscall vtkParametricFunction::vtkParametricFunction(void)" (__imp_??0vtkParametricFunction@@IAE at XZ) referenced in function "protected: __thiscall myParametricTrefoilKnot::myParametricTrefoilKnot(void)" (??0myParametricTrefoilKnot@@IAE at XZ)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObjectBase::Delete(void)" (?Delete at vtkObjectBase@@UAEXXZ)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObjectBase::FastDelete(void)" (?FastDelete at vtkObjectBase@@UAEXXZ)
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 at vtkObjectBase@@UAEXAAV?$basic_ostream at DU?$char_traits at D@std@@@std@@VvtkIndent@@@Z)
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 at vtkObjectBase@@UAEXAAV?$basic_ostream at DU?$char_traits at D@std@@@std@@VvtkIndent@@@Z)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObjectBase::Register(class vtkObjectBase *)" (?Register at vtkObjectBase@@UAEXPAV1@@Z)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObjectBase::UnRegister(class vtkObjectBase *)" (?UnRegister at vtkObjectBase@@UAEXPAV1@@Z)
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 at myParametricTrefoilKnot@@MAEXAAV?$basic_ostream at DU?$char_traits at D@std@@@std@@@Z)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall vtkObject::RegisterInternal(class vtkObjectBase *,int)" (?RegisterInternal at vtkObject@@MAEXPAVvtkObjectBase@@H at Z)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall vtkObject::UnRegisterInternal(class vtkObjectBase *,int)" (?UnRegisterInternal at vtkObject@@MAEXPAVvtkObjectBase@@H at Z)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall vtkObjectBase::ReportReferences(class vtkGarbageCollector *)" (?ReportReferences at vtkObjectBase@@MAEXPAVvtkGarbageCollector@@@Z)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::DebugOn(void)" (?DebugOn at vtkObject@@UAEXXZ)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::DebugOff(void)" (?DebugOff at vtkObject@@UAEXXZ)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkObject::Modified(void)" (?Modified at vtkObject@@UAEXXZ)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual unsigned long __thiscall vtkObject::GetMTime(void)" (?GetMTime at vtkObject@@UAEKXZ)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMinimumU(double)" (?SetMinimumU at vtkParametricFunction@@UAEXN at Z)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMinimumU(void)" (?GetMinimumU at vtkParametricFunction@@UAENXZ)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMaximumU(double)" (?SetMaximumU at vtkParametricFunction@@UAEXN at Z)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMaximumU(void)" (?GetMaximumU at vtkParametricFunction@@UAENXZ)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMinimumV(double)" (?SetMinimumV at vtkParametricFunction@@UAEXN at Z)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMinimumV(void)" (?GetMinimumV at vtkParametricFunction@@UAENXZ)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMaximumV(double)" (?SetMaximumV at vtkParametricFunction@@UAEXN at Z)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMaximumV(void)" (?GetMaximumV at vtkParametricFunction@@UAENXZ)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMinimumW(double)" (?SetMinimumW at vtkParametricFunction@@UAEXN at Z)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMinimumW(void)" (?GetMinimumW at vtkParametricFunction@@UAENXZ)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetMaximumW(double)" (?SetMaximumW at vtkParametricFunction@@UAEXN at Z)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual double __thiscall vtkParametricFunction::GetMaximumW(void)" (?GetMaximumW at vtkParametricFunction@@UAENXZ)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetJoinU(int)" (?SetJoinU at vtkParametricFunction@@UAEXH at Z)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall vtkParametricFunction::GetJoinU(void)" (?GetJoinU at vtkParametricFunction@@UAEHXZ)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::JoinUOn(void)" (?JoinUOn at vtkParametricFunction@@UAEXXZ)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::JoinUOff(void)" (?JoinUOff at vtkParametricFunction@@UAEXXZ)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetJoinV(int)" (?SetJoinV at vtkParametricFunction@@UAEXH at Z)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall vtkParametricFunction::GetJoinV(void)" (?GetJoinV at vtkParametricFunction@@UAEHXZ)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::JoinVOn(void)" (?JoinVOn at vtkParametricFunction@@UAEXXZ)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::JoinVOff(void)" (?JoinVOff at vtkParametricFunction@@UAEXXZ)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetTwistU(int)" (?SetTwistU at vtkParametricFunction@@UAEXH at Z)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall vtkParametricFunction::GetTwistU(void)" (?GetTwistU at vtkParametricFunction@@UAEHXZ)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::TwistUOn(void)" (?TwistUOn at vtkParametricFunction@@UAEXXZ)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::TwistUOff(void)" (?TwistUOff at vtkParametricFunction@@UAEXXZ)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::SetTwistV(int)" (?SetTwistV at vtkParametricFunction@@UAEXH at Z)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall vtkParametricFunction::GetTwistV(void)" (?GetTwistV at vtkParametricFunction@@UAEHXZ)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::TwistVOn(void)" (?TwistVOn at vtkParametricFunction@@UAEXXZ)
2>TrefoilKnot.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall vtkParametricFunction::TwistVOff(void)" (?TwistVOff at vtkParametricFunction@@UAEXXZ)
etc. etc.
________________________________
From: Andrew Maclean [andrew.amaclean at gmail.com]
Sent: Sunday, 4 October 2015 2:53 p.m.
To: Gib Bogle
Cc: vtk; logicmonkeyuk
Subject: RE: [vtkusers] Computational Geometry - user equations?


vtkNamedColors was introduced in VTK 6. For VTK 5 you will have to specify colours using RGB values.

e.g something like:
unsigned char red[3] = {255, 0, 0};
  actor->GetProperty()->SetColor(red[0], red[1], red[2]);

Andrew Maclean

On 4 Oct 2015 12:35 pm, "Gib Bogle" <g.bogle at auckland.ac.nz<mailto:g.bogle at auckland.ac.nz>> wrote:
Hi Piers, Andrew, Cory,

This does not build with VTK 5.10 (no vtkNamedColors.h).  Is there a version that works with 5.10?

Thanks
Gib
________________________________
From: vtkusers [vtkusers-bounces at vtk.org<mailto:vtkusers-bounces at vtk.org>] on behalf of piers.barber at logicmonkey.co.uk<mailto:piers.barber at logicmonkey.co.uk> [piers.barber at logicmonkey.co.uk<mailto:piers.barber at logicmonkey.co.uk>]
Sent: Sunday, 4 October 2015 1:48 p.m.
To: andrew.amaclean at gmail.com<mailto:andrew.amaclean at gmail.com>
Cc: vtk
Subject: Re: [vtkusers] Computational Geometry - user equations?


Andrew, Cory,

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.

I've attached my trefoil knot code in a zip. The partial derivatives make a big difference to shadows.

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.

I'm pleased that this works, but the output surface is rather jagged when compared to what I get with MathMod. Any ideas?

For the VTK user list, the zipped files I mention are here:

https://github.com/logicmonkey/curves/tree/master/vtk/TrefoilKnot

( unzip/git pull; cd TrefoilKnot; mkdir build; cd build; cmake ..; make; ./bin/TrefoilKnot )

Thanks again for your help.

--

Piers Barber (-=:LogicMonkey;=-)

On 2015-10-01 00:19, Andrew Maclean wrote:

If I understand you correctly, then the approach described in http://www.vtk.org/img/ParametricSurfaces.pdfin " 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.

I attach  a VTK 6.3+ version of the example for you to try out.

I'll add this to the VTK examples sometime next week.

Once you get a surface you might like to look at:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/ElevationBandsWithGlyphs
and
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CurvatureBandsWithGlyphs
for some visualisation ideas.


Regards
   Andrew



---------- Forwarded message ----------
From: Cory Quammen <cory.quammen at kitware.com<mailto:cory.quammen at kitware.com>>
To: piers.barber at logicmonkey.co.uk<mailto:piers.barber at logicmonkey.co.uk>
Cc: "vtkusers at vtk.org<mailto:vtkusers at vtk.org>" <vtkusers at vtk.org<mailto:vtkusers at vtk.org>>
Date: Wed, 30 Sep 2015 09:15:45 -0400
Subject: Re: [vtkusers] Computational Geometry - user equations?
On Tue, Sep 29, 2015 at 12:13 PM, <piers.barber at logicmonkey.co.uk<mailto:piers.barber at logicmonkey.co.uk>> wrote:
Hi All,

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.

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:

http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/ParametricObjectsDemo#CMakeLists.txt

Yep, that looks like a good way to go.

I'm using vtkParametricTorus[.h, .cxx] as a template, but is there an easier and more direct way to do this?

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.

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.

Cory

Thanks!

-=:LM:=-
_______________________________________________
Powered by www.kitware.com<http://www.kitware.com>

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers



--
Cory Quammen
R&D Engineer
Kitware, Inc.


--
___________________________________________
Andrew J. P. Maclean

___________________________________________




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151004/ad06a222/attachment.html>


More information about the vtkusers mailing list