I was wondering if it is possible to translate a mu-calculus formula to a modal formula?
For example, is it possible to translate $\nu X. \phi$ to a modal formula?
Related
I'm trying to make visualization for iterative algorithm, using macroquad and egui. Pure plot on macroquad looks like this:
Note that each circle or vertice is a struct instance with N fields, content from which I want to appear with hovering over the circle's perimeter?
How can I do it? Which way is more elegant/better to use? I think of writing custom widget for each circle and therefore hovering on this widget. But it seems complicated — I have a lot of circles thus need a lot of widgets. Probably better would be using some fields, where if user clicked, window appeared with information.
Any help is really appreciated
I am using Mathcad 14 and I would like to know if one can write partial derivatives in Mathcad. On the Calculus palette we just have the normal derivative symbol.
I'm using Mathcad 15---
I can insert a derivative using the Calculus palette, and then right-click
on the derivative. Choose View Derivative As > Partial Derivative on the popup menu.
I have 2 arrays say X and Y. Each have 5 elements. Now for each possible combination of (X,Y) I have a Z value, so Z is a 5x5 matrix.
I am looking to find a formula e.g. z=f(x,y). Any idea about how that can be done.
I tried MS Excel surface chart, but it doesn't give any equation or curve fitting on surface charts.
in general I would suggest to use some other software like SciLab or Matlab to work on this task. These products are more computatinal mathematics than Excel.
But Excel has some built-in features that maybe will help you.
First note:
You will need to use the Add-In called "Solver". This add-in comes along with Excel, but maybe is not installed as default on your installation.
One description (there are thousands available in www) how to install that add-in you will find here:
Solver Add-in
If you are done with this, the next step is to create a sheet with the data.
I tried to generate an example shown in the picture below.
The range C5:G9holds the Matrix you want to approximate by a function.
So it's the z=f(x,y) Matrix.
The Chart beside is just the 3D-Plot of your (in this case my) original data.
Now it will become a little bit mathematical....
You need a general type of function which will be used to do the approximation.
The quality of the result is depending on how good this function is able to come close to your data.
In the example I used an approach with a 2nd order approximation (maximum quadratic terms).
My example function is z=a*x^2 + b*y^2 + c *x*y + d*x + e*y +f.
If you need more, try it with a third order term (including also x^3, y^3 , ...).
I didn't want to do this in the example, because I'm hating to type long formulas in Excel.
Typing long formula is the next step:
Now we have to fill the range C15:G19 with the values of the calculated formula. But before this, we have to define the polynomial coefficiants in range J14:J19. As a starting value, you can use just 1 for all coefficients (the picture shows the solution after running the solver)
The formula in Cell C15 is =$J$14*C$14^2+$J$15*$B15^2+$J$16*C$14*$B15+$J$17*C$14+$J$18*$B15+$J$19
It should be easy to copy it to the other cells of the Matrix.
The plot beside this is showing the result of our approximation function.
Now we have to prepare the solver. The solver needs to optimize somehow.
Therefore we need to define a function which indicates the quality of our approximation.
I used the least square value... Have a look on the www for explanations.
In the range C24:G28 I calculated the squares of the differences from our approximation function to the original data. Cell C24 has the formula =(C15-C5)^2
Now we are close to be finished. Just copy this formula to the rest of the range and than add one very important cell:
Put the sum of the range C24:G28 in Cell H29
This value is the sum of the error or better to say the difference of our approximation function to the original data points.
Nowe the most important !!!
Select Cell H29 and start the solver add-in:
This window will pop-up (sorry I have a German Excel installation on my PC)
Just fill in the value fro target cell $H$29, target value =0 and the variable cells (important) $J$14;$J$19
Press "solve" and .... tada the polynomial coefficiants have changed to fit your data with the function.
Is this, what you have been searching for ???
Kindly Regards
Axel
You may google for and try ThreeDify Excel Grapher v4.5, an excel addin that includes a 3D equation fitter with an auto-equation finder.
Is there a simple algorithm for calculating an acutance value (or sharpness) for a grayscale image?
As I understand it, the Accutance is the mean value of the Gradient Filter.
Example in Mathematica:
Relationship between brightness and the blurriness of an image
The question's title is confusing, but the answer answers this.
I'm trying to build something like the Liquify filter in Photoshop. I've been reading through image distortion code but I'm struggling with finding out what will create similar effects. The closest reference I could find was the iWarp filter in Gimp but the code for that isn't commented at all.
I've also looked at places like ImageMagick but they don't have anything in this area
Any pointers or a description of algorithms would be greatly appreciated.
Excuse me if I make this sound a little simplistic, I'm not sure how much you know about gfx programming or even what techniques you're using (I'd do it with HLSL myself).
The way I would approach this problem is to generate a texture which contains offsets of x/y coordinates in the r/g channels. Then the output colour of a pixel would be:
Texture inputImage
Texture distortionMap
colour(x,y) = inputImage(x + distortionMap(x, y).R, y + distortionMap(x, y).G)
(To tell the truth this isn't quite right, using the colours as offsets directly means you can only represent positive vectors, it's simple enough to subtract 0.5 so that you can represent negative vectors)
Now the only problem that remains is how to generate this distortion map, which is a different question altogether (any image would generate a distortion of some kind, obviously, working on a proper liquify effect is quite complex and I'll leave it to someone more qualified).
I think liquefy works by altering a grid.
Imagine each pixel is defined by its location on the grid.
Now when the user clicks on a location and move the mouse he's changing the grid location.
The new grid is again projected into the 2D view able space of the user.
Check this tutorial about a way to implement the liquify filter with Javascript. Basically, in the tutorial, the effect is done transforming the pixel Cartesian coordinates (x, y) to Polar coordinates (r, α) and then applying Math.sqrt on r.