Ideas on generating 3D LUTs programmatically? - math

I'm trying to figure out, how to build .3d, .cube or .mga files, which contain look up table data for color correction (e.g. Adobe Lightroom, Davinci Resolve etc.), programmatically. I can't find any hints on how a .cube file is written, structured and/or compiled or which language to use (glsl, c++, python ?). Maybe some of you guys have an idea on how to approach this topic?

Related

How to make own text editor for math equation?

I'm using C# on Windows (but I can also use C++)
What I want to make is just an own text editor that I can write/edit mathematical equations/formulas.
Reason why I'm looking for this function is that the calculations of my structural analyzing programs are only editable with in my C# code. I want my programs provide a function that a user can add their own formulas for design checking or whatever so that my programs can be more widely used.
I know how to parsing equation of string form to multiple variables in code so I can compute what I want. However, I really have no idea that how to display own text editor. I think it can't be done by textbox and only thing I can think of is using opengl api. But I believe there should be easier and efficient way to this job done.
My programs are currently run on windows only but I'm planning to make OSX version and web version as well. I don't mind if solution only available for windows only or not. If anyone knows easy way to display own text-box, please help me. I will really appreciate for it. Thanks for reading my question.

How to convert IFC file to OBJ File...?

I am trying to convert IFC file to OBJ and Reverse OBJ to IFC using C# .Net.
If any body has any idea. Help me to achieve this functionality.
For Ifc-to-Obj, you should take a look at the Xbim framework (xbimteam on github) as you will be able to generate triangulated polyhedron and then turn it into OBJ data.
In all cases, without a framework for parsing your Ifc file, you won't be able to go anywhere ...
It is going to be hard in opposite Obj-to-Ifc direction, as OBJ format does not contains building element informations you'll need to create an Ifc.
Might come a bit late, and I know that it doesn't directly answer the question regarding the programming language, but if you have the possibility to use JavaScript/NodeJS, you could use the ifc-convert package based also on IfcOpenShell. It worked fine for me. Hope it helps.

Ada dependency graph

I need to create a dependency graph for a software suite that I am working on. In the past the company I work for has always done this manually, but I am guessing that there is a tool somewhere that will do what we need.
The software I am working with is Ada95, and has about 200 code modules/files, with about 40 packages. I need to create a map that will trace every output, individually, back to each input or constant that will have an impact on the output. Does anybody know of a tool that would accomplish this? Or even just partially accomplish it?
AdaCore's GPS (available from http://libre.adacore.com) comes with a command line tool named gnatinspect. You can use this tool to load all cross-reference information generated by the compiler (assuming you are compiling with GNAT). This creates a sqlite database (gnatinspect.db) which contains all information you need. gnatinspect itself provides a number of pre-made queries that might get you at least partially to where you want to go.
You could also look at ASIS, as a way to do this kind of queries directly on the code. I am told this is not so easy to use the first time around though.
There is also an older tool provided with gnat (gnatxref) which does something similar, although it is being superceded by gnatinspect.
Finally, you could look at gnat2xml as an alternative to ASIS if you are more comfortable parsing XML files.

Is there any method for fix manually an Alloy Analyzer graph?

I need to fix my Alloy graph, for example I have this output:
I can't move "node2" rectangle over the row of "node0" and "node1", and I can't move "node1" under "node2" whitout also move "node0". Is there any solution? Thank you.
PS: I am using Alloy Analyzer 4.2 under Windows.
PPS: This is only an example, i get a big graph with 5 or 6 rows of 20-25 rectangles, and if I can't fix it manually, it's only a mess.
To answer the direct question: I for one have never found a way to make the visualizer change its mind about which nodes should be on the same horizontal level. (That doesn't quite mean it's not possible, but it does mean that if it's possible it's not immediately obvious how to do it. But I guess you knew that already.)
If your goal is to make the auto-generated diagrams easier to read, the simplest approach is to experiment with adjustments to the visualizer theme. The "Magic Layout" button can be helpful; manual adjustments to hide some nodes or display some relations as labels rather than arcs can help with diagrams which are otherwise too cluttered.
If your goal is to make a 'good' version of a diagram for inclusion on a slide for a talk or a figure for a paper, you may want to export to Dot and import into a graph-drawing tool that gives you the kind of manual control you want (or edit the .dot file yourself, if you are familiar with graphviz and can make it do what you want), or export to XML and generate the graph description language of your choice from the XML.
I hope this helps.
The Lightning tool is an Ecplise plugin relying on Alloy4.2 to formally define Domain Specific Languages and might be a solution to your problem.
It's still under development, but if you are only interested in being able to freely reorganize each atom and label of generated instances, there shouldn't be any problems, as it uses Ecplise draw2D to render those latter.
If now you're really interested in providing an intuitive visualization to your generated instance (by intuitive I mean a visualization that is closer to its domain rather than the structure of your model), then you can define your own language (with your model as abstract syntax ) and define a concrete syntax for it.
The update site to be used for the installation of the tool is : http://lightning.gforge.uni.lu/update-site
Don't hesitate to contact me if you plan to give it a shot and get any issues.
(I'm eager of constructive feedbacks ;-) )
The steps to follow to generate a graphical instance in which any components can be moved are :
Install Lightning
Create a new Lightning Project
Create a new Language in this project
Put your model in the ASM folder
generate instances of the language by "running the project"

Display a .dot file inside a Qt application

I am new to Qt and C++... Now, I am writing an application in Qt, in which I have to display an already generated .dot file inside my application. I tried the render function but did not work for me.. Can anyone out there help me in this regard..
Thanks
Had the same problem using Python. I came up with this solution:
svg_string = dot_graph.create_svg(prog='dot')
svgWidget = QtSvg.QSvgWidget()
svgWidget.load(QtCore.QByteArray(svg_string))
Guess you can do something similar in C++
Plotting directly a dot file requires to be able to display the nodes in the correct positions, and link them properly. This is done by very complicated engines and is not included in the dot file, which is simply a description of the graph. Maybe there are C++/Qt libraries that take dot files as an input, but I don't know them.
According to this topic (Graphviz: How to go from .dot to a graph?), you can easily transform a dot file into a png or svg file. If you want to display the rendered graph into your application, the easiest thing to do is to generate that png picture (from the shell or from your code) and to manipulate it from your program.
Take a look to QGraph. You will need much more work to make your graphs interactive.
Anyway, if you are new to Qt, even the simple display it's a steep introduction to graphics.
I have my own implementation, but I'm sorry it's not yet ready for publishing - I will do in a SWI-Prolog context...

Resources