graphics

How to find intersecting Y values along a bezier spline?

纵然是瞬间 提交于 2019-12-25 05:16:10
问题 It's been a while since I did any maths* of this kind, so perhaps someone can answer this for me. I don't think this question is exactly what I want, because I am trying to find intersections for precise x values. So I have a spline which goes from X,Y to XX,YY, with control points at each end. I think I would be correct in saying it will be a quadratic curve (the curve will not cross itself). I plan on using the path routines from the given graphics library (currently thinking HTML5 canvas)

Graphics2D does PostModern

自闭症网瘾萝莉.ら 提交于 2019-12-25 05:02:23
问题 In the following code changing fill to draw produces unexpected results. The attached image demonstrates the undesired but much appreciated postmodern effect caused by draw ing the red and green rectangles. The affine transform should not be part of the problem, but as Holmes said, once you rule out all other possibilities ... So, I will explain the transform. I solved a bunch of equations to figure out how to make the window show a cartesian coordinate system with (-2, -2) in the lower left

How can I split a mesh in several pieces so that all are smaller than a given number of vertices?

大兔子大兔子 提交于 2019-12-25 04:56:13
问题 I need to import a mesh to an app that can only handle a certain number of meshes per object. Because of that, I'm forced to split the mesh into several pieces until all pices are below the maximum vertex count. The splitting has to happen in runtime, so I can't use an external application to split the mesh. I don't have any requirement regarding how the mesh is split, but it should conservate all faces, normals and UVs. Is there any known algorithm that can do so? 回答1: You need to use a

How big should an Internet Explorer toolbar icon be?

对着背影说爱祢 提交于 2019-12-25 04:38:14
问题 I'm trying adding my own toolbar icon to Internet Explorer but am unsure what size it should be. The Designing Toolbar Icons for Internet Explorer articles on TechNet indicates 20x20 and 16x16 pixels. Messages (1, 2) in the Internet Explorer Toolbar (Deskband) Tutorial at Code Project imply 22x22 and 16x16 pixels. Using Internet Explorer 7, icons that are 20x20 pixels seem to get stretched. Measuring shows they should be at least 24x24. Anyone have a definitive reference? Alternatively, where

I'm looking for specific matrices to plug into a convolution matrix

旧巷老猫 提交于 2019-12-25 04:22:17
问题 Assuming I already have a working convolution matrix algorithm in place, I'm looking for practical examples of general matrices that are useful for image processing in particular. The canonical examples you'll find everywhere are non-gaussian box blur: 1 1 1 1 1 1 1 1 1 Image sharpening: 0 -1 0 -1 5 -1 0 -1 0 Edge detection: 0 1 0 1 -4 1 0 1 0 and emboss: -2 -1 0 -1 1 1 0 1 2 Are there more I'm missing? 回答1: have you ever played with jitter, the image processing framework that's part of max

I'm looking for specific matrices to plug into a convolution matrix

大城市里の小女人 提交于 2019-12-25 04:22:08
问题 Assuming I already have a working convolution matrix algorithm in place, I'm looking for practical examples of general matrices that are useful for image processing in particular. The canonical examples you'll find everywhere are non-gaussian box blur: 1 1 1 1 1 1 1 1 1 Image sharpening: 0 -1 0 -1 5 -1 0 -1 0 Edge detection: 0 1 0 1 -4 1 0 1 0 and emboss: -2 -1 0 -1 1 1 0 1 2 Are there more I'm missing? 回答1: have you ever played with jitter, the image processing framework that's part of max

OpenGL: Rendering a model with a lot of texture transparency, without draw ordering?

陌路散爱 提交于 2019-12-25 04:20:55
问题 I have low-poly character models that make heavy use of textures to define shape using the alpha channel. (An example would be glasses, which are only 3 solid large quads, but the alpha channel of the texture defines the shape of the glasses) So there's a tonne of transparency/translucency goin' on, I estimate that one quarter of every tri drawn, will have at least a little transparency in it's texture needing blending. Most of the transparency occurs in the hair, which layers up geometry

Add event handler to graphics figure painted

一笑奈何 提交于 2019-12-25 04:15:33
问题 I know I can add event handlers to buttons, labels and textboxes like this: AddHandler button1.click , AddressOf Subbutton1_click I can actually draw a circle, ellipse, rectangle or another figure using graphics inside the Form Paint event: e.Graphics.DrawEllipse(pen1, 0.0F, 0.0F, 200.0F, 200.0F) That works, but how can I add an event handler for that graphics that I've just drawn? Any help will be appreciated. Thanks in advance 回答1: You can have one event raise another event. Lets start with

Algorithm Efficiency Pattern Matching, Checking for image inside image

断了今生、忘了曾经 提交于 2019-12-25 03:57:15
问题 This is a more descriptive version of my previous question. The problem I am trying to solve relates to block-matching or image-within-image recognition. I see an image, extract the [x,y] of every black pixel and create a set for that image, such as {[8,0], [9,0], [11,0]} The set is then augmented so that the first pixel in the set is at [0,0], but the relationship of the pixels is preserved. For example, I see {[8,0], [9,0]} and change the set to {[0,0], [1,0]}. The point of the extraction

Generating complex paths in expression blend

谁说我不能喝 提交于 2019-12-25 03:53:19
问题 I've noticed a lot of applications have complex Path data that draw everything from images to text. Are these drawn directly with the pen tool or is there an easier way to draw these complex paths? 回答1: You can draw them with the Pen tool, however, there are "better" ways (for some definitions of better). You can use the Expression Design product to create source art and bring that into Blend. You can also use either Adobe Illustrator or Adobe Photoshop to create your art and then import that