Photoshop making isometric? - photoshop

Hi everyone. I'm trying to learn isometric picture on photoshop.
I've found an example on web, just as an image. At this image, left square is my tile. I should transform this to the diamond at right.
But I'm wondering that, how can I make it most pratically?
I've transform the rotate to 45'.
What should I do now?
I've used distort to the the same but I don't know which values I should enter.
X: ? Y: ? W: ? Y: ? H:? ANGLE: ?
my square is 200px/200px. and which values I must enter to make it diamond like in the picture (is there any math formule?)

So:
Rotate angle 45
Resize image: W=100%, H=58%
or use this script

Maybe you can transform x'=x and y'=x+y/2. Look the spiral search: Optimizing search through large list of lat/long coords to find match.

Related

Conditional Vertex Selection with radius not working in Meshlab

I'm using meshlab to process a dense point cloud right now. I'm trying to remove some points that have radius bigger than a certain number from the center, but could not get Meshlab to select those points. I'm using Conditional Vertex Selection, but the (rad > 0) function is not selecting any point at all. I also centered the bounding box at the origin.
enter image description here
Does anyone know what the problem is? Thanks!
I'm not really sure what the "rad" variable refers to, but I don't think it is a spherical distance from the center. However if you want to select vertices larger than a spherical radius from the center, you can use something like (sqrt(x^2+y^2+z^2) >= 100), replacing 100 with whatever radius you want.
Shameless plug: MLX incorporates both cylindrical and spherical selection shortcuts as functions mlx.select.cylindrical_vert & mlx.select.spherical_vert.

Smoothly painting a path of straight line segments in Qt5

I have a series of straight line segments of varying thickness connected end-to-end to create meandering path. Does anyone know a way to paint this as a smooth meandering line, sort of like vectorizing it? I am using QPainter. I haven't had any success finding an appropriate function in QPainterPath.
The data looks something like this:
[(QPointF, width), (QPointF, width), (QPointF, width), ... ]
Thanks!
EDIT: Added example image
I wanted to leave it open to creative responses, but I am just looking to move from linear interpolation (QPainter::drawLine()) to spline interpolation.
If I understand your question correctly...
Don't draw a line, draw a filled polygon that encloses your line data with the right thickness. Drawback: That requires calculations on your data beforehand.

How to get the angle of an image ? (IOS)

Ok, so I rotated an image by 25 degrees like this :
MyImage.layer.affineTransform = CGAffineTransformMakeRotation(25);
Now I want to rotate the image again by 25 more degrees (50 degrees in total)
So my question is, How do I rotate X more degrees an image ?
If you have any other way to rotate an image or better way please include your code.
There is no need to know the current angle! Instead of setting the affineTransform, which is only a shortcut, apply an actual 3D transform. Now you can call CATransform3DRotate, which rotates an existing transform — and thus is additive.

How To remove ugly font smoothing on ipad apps

I'm working on an iPad app with xcode 4.0.2 and im having trouble getting my fonts to look sharp and clear when i set the font size below 15px. It appears that there is some level of font smoothing being applied to the font and it doesn't look good at all. I've tried several different fonts and i get the same effect. Is there a way i can turn this off?
Make sure you are actually drawing on non fractioned coordinates. If for example you start drawing on X = 0.5 and Y = 0.0, your text will look lousy. Same goes for vertical coordinates. In case your coordinates are resulting from a calculation, simply add a cast towards an integer like this:
CGPoint startDrawingAt = CGPointMake((int)x, (int)y);
Or use proper rounding:
CGPoint startDrawingAt = CGPointMake(roundf(x), roundf(y));

Objective C - Detect a "path" drawing, inside a map image

I have a physical map (real world), for example, a little town map.
A "path" line is painted over the map, think about it like "you are here. here's how to reach the train station" :)
Now, let's suppose I can get an image of that scenario (likewise, coming from a photo).
An image that looks like:
My goal is not easy way out!
I want to GET the path OUT of the image, i.e., separate the two layers.
Is there a way to extract those red marks from the image?
Maybe using CoreGraphics? Maybe an external library?
It's not an objective C specific question, but I am working on Apple iOS.
I already worked with something similar, the face-recognition.
Now the answer I expect is: "What do you mean by PATH?"
Well, I really don't know, maybe a line (see above image) of a completely different color from the 'major' colors in the background.
Let's talk about it.
If you can use OpenCV then it becomes simpler. Here's a general method:
Separate the image into Hue, Saturation and Variation (HSV colorspace)
Here's the OpenCV code:
// Compute HSV image and separate into colors
IplImage* hsv = cvCreateImage( cvGetSize(img), IPL_DEPTH_8U, 3 );
cvCvtColor( img, hsv, CV_BGR2HSV );
IplImage* h_plane = cvCreateImage( cvGetSize( img ), 8, 1 );
IplImage* s_plane = cvCreateImage( cvGetSize( img ), 8, 1 );
IplImage* v_plane = cvCreateImage( cvGetSize( img ), 8, 1 );
cvCvtPixToPlane( hsv, h_plane, s_plane, v_plane, 0 );
Deal with the Hue (h_plane) image only as it gives just the hue without any change in value for a lighter or darker shade of the same color
Check which pixels have Red hue (i think red is 0 degree for HSV, but please check the OpenCV values)
Copy these pixels into a separate image
I's strongly suggest using the OpenCV library if possible, which is basically made for such tasks.
You could filter the color, define a threshold for what the color red is, then filter everything else to alpha, and you have left over what your "path" is?