Wings 3D Development Forum
Wings clone in C++ - Printable Version

+- Wings 3D Development Forum (https://www.wings3d.com/forum)
+-- Forum: Wings 3D (https://www.wings3d.com/forum/forumdisplay.php?fid=1)
+--- Forum: Off Topic (https://www.wings3d.com/forum/forumdisplay.php?fid=11)
+--- Thread: Wings clone in C++ (/showthread.php?tid=964)

Pages: 1 2 3


RE: Wings clone in C++ - Arg Arg - 01-18-2015

@GG
that are very good news to hear...
so it would be no problem to code
the QUAD-EDGE DATA STRUCTURE
in ERLANG... maybe C/C++ would not
fit for the job.

The Quad-Edge Struct is a child of
Winged-Struct and the mesh manipulation
is faster and more complex operations
can be done easily.


http://en.m.wikipedia.org/wiki/Quad-edge

http://www.cs.cmu.edu/afs/andrew/scs/cs/15-463/2001/pub/src/a2/quadedge.html

PDF:
https://www.google.de/url?sa=t&source=web&rct=j&ei=H4e7VJzdE8f2O66ngdgL&url=http://www.cs.mcgill.ca/~tim/cs617/quadedge050329.pdf&ved=0CDoQFjAK&usg=AFQjCNENdJK4k-R4KULhAmSZfTEF8TC-ZA

ok... so it is no problem to do that in erlang?
why not extend wings with the quad-edge-data-structure?
seems to be no need for C/C++?


RE: Wings clone in C++ - ggaliens - 01-18-2015

Nemyax ... this is really easy for me to field .... "No less suited than Erlang is. It's a general-purpose programming language, and a mesh is a data structure. So how is it not suited?"

Erlang to me ... is a fundemental match for polygon processing for TWO reasons ...
1) Language fundemental pattern matching syntax.
2) Degree to which hash, list, and set are fundemental to the languages.

My opinion rendered above is not complete. The fundemental MATCH is nuanced but extremely clear if say you are a Mathematician and Programmer by trade. Wings3D is using its strengths to ask questions of the mesh that are not so quickly answered in other languages.

The math of MESHES is really discrete and finite math ... if you took GOOD solid courses at a university that studied Topology, functions, sets, GROUPS, etc ... You would use a sweet language like ISETL or Erlang or LISP with maybe something built on top of LISP. You WOULD NOT USE C++.


RE: Wings clone in C++ - nemyax - 01-18-2015

ggaliens
SideFX knows how to handle mind-boggling graphs and multiple types of geometry definition, all in C++. I think whether you can do something or other with a language as large as C++ is a matter of how good you are with it.


RE: Wings clone in C++ - ggaliens - 01-18-2015

Sure ... you can catch a fly with chop-sticks also.

But I'd just use a fly-swatter myself.

Nothing wrong with a language like C++ for hardening parts of a well defined system. But as far as designing a system that is fundamentally wanting to be handled by a lists,sets, tuple based language without the shackles of being strongly typed ... man ... just no comparison at all.

Wings defers to native code (think C/C++) in a number of places where it should ... like compositing things for screen and of course interfacing to existing libraries. Use of jpeg libs, etc.

Use a tool where it excels. Use Erlang and Functional programming to design a great mesh processor ... oh ... that happened 30 years ago with LISP and then 15 years ago with Erlang. OK !


RE: Wings clone in C++ - nemyax - 01-18-2015

(01-18-2015, 07:30 PM)ggaliens Wrote: But as far as designing a system that is fundamentally wanting to be handled by a lists,sets, tuple based language without the shackles of being strongly typed ... man ... just no comparison at all.
I remember Bjorn mentioning that if he had to start over, he'd probably go with Haskell. Now that one has even stronger typing than C++ =)


RE: Wings clone in C++ - ggaliens - 01-19-2015

Really ... are you sure ? (From wikipedia site on strong typing)

Code:
Languages with static type systems differ in the extent to which users are required to manually state the types used in their program. Some languages, such as C, require that every variable be declared with a type. Other languages, such as Haskell, use the Hindley-Milner method to infer all types based on a global analysis. Other languages, such as C# and C++, lie somewhere in between; some types can be inferred based on local information, while others must be specified. Some programmers use the term weakly typed to refer to languages with type inference, often without realizing that the type information is present but implicit.



RE: Wings clone in C++ - nemyax - 01-19-2015

From what I've read about Haskell, there's advanced type inference, but no implicit type conversion. For example, you can't pass an Int to a function that is :: Float -> a. You have to convert.


RE: Wings clone in C++ - ggaliens - 01-19-2015

That's OK ... In Erlang ... Wings3D uses GUARDS wherever they feel like to maybe a function declaration "More Strongly Typed". I like that ... that's the onus is on the user here in Erlang (mo' freedom man).

I have started using a lot more guards as well ... it does make debugging easier for me. But ... it's not crammed down my throat to need to do it for every function.


RE: Wings clone in C++ - nemyax - 01-20-2015

(01-19-2015, 05:10 PM)ggaliens Wrote: mo' freedom man
Yay, more badmatches at runtime! =)


RE: Wings clone in C++ - ggaliens - 01-20-2015

It's not a bad match nemyax ... it's a reminder to the future coder ... to use the function properly.

But again ... it is done as much as is needed. Maybe guard 1 of 3 parameters for clarity. Maybe 2, maybe none. Freedom.

All the bugs happen at runtime. Bad match is as easy as any to debug. Leaving the guard off may allow the crash dump to be longer.