graphics

Methods adding Excel-like features to R plots? [closed]

北城余情 提交于 2020-01-22 09:30:20
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 8 years ago . I've been poking around with R graphical parameters trying to make my plots look a little more professional (e.g., las=1 , bty="n" usually help). Started playing with tikzDevice , which was a huge improvement in

Recommend some Bresenham's-like algorithm of sphere mapping in 2D?

主宰稳场 提交于 2020-01-21 13:59:05
问题 I need the fastest sphere mapping algorithm. Something like Bresenham's line drawing one. Something like the implementation that I saw in Star Control 2 (rotating planets). Are there any already invented and/or implemented techniques for this? I really don't want to reinvent the bicycle. Please, help... Description of the problem. I have a place on the 2D surface where the sphere has to appear. Sphere (let it be an Earth) has to be textured with fine map and has to have an ability to scale

Recommend some Bresenham's-like algorithm of sphere mapping in 2D?

喜欢而已 提交于 2020-01-21 13:58:10
问题 I need the fastest sphere mapping algorithm. Something like Bresenham's line drawing one. Something like the implementation that I saw in Star Control 2 (rotating planets). Are there any already invented and/or implemented techniques for this? I really don't want to reinvent the bicycle. Please, help... Description of the problem. I have a place on the 2D surface where the sphere has to appear. Sphere (let it be an Earth) has to be textured with fine map and has to have an ability to scale

Recommend some Bresenham's-like algorithm of sphere mapping in 2D?

筅森魡賤 提交于 2020-01-21 13:57:30
问题 I need the fastest sphere mapping algorithm. Something like Bresenham's line drawing one. Something like the implementation that I saw in Star Control 2 (rotating planets). Are there any already invented and/or implemented techniques for this? I really don't want to reinvent the bicycle. Please, help... Description of the problem. I have a place on the 2D surface where the sphere has to appear. Sphere (let it be an Earth) has to be textured with fine map and has to have an ability to scale

Plot a function with several arguments in R

安稳与你 提交于 2020-01-21 09:21:07
问题 Suppose I want to plot an R function: weibull <- function(ALPHA, LAMBDA, T){ ALPHA*LAMBDA*(T^(ALPHA-1)) } So the function takes the arguments alpha, lambda and T. I want to generate a plot where in one plot alpha =0.5, time ranges from 0 to 2 and lambda=1, 2, 4, 8, 16 and in another, alpha=1, time ranges from 0 to 2 and lambda=1, 2, 4, 8, 16. In the past for plotting functions with just one argument, I've used curve and then done ADD=TRUE if I wanted another curve on the same plot. So for

Remove surrounding whitespace from an image

牧云@^-^@ 提交于 2020-01-19 04:46:06
问题 I have a block of product images we received from a customer. Each product image is a picture of something and it was taken with a white background. I would like to crop all the surrounding parts of the image but leave only the product in the middle. Is this possible? As an example: [http://www.5dnet.de/media/catalog/product/d/r/dress_shoes_5.jpg][1] I don't want all white pixels removed, however I do want the image cropped so that the top-most row of pixels contains one non-white pixel, the

Android - Draw Picture over ImageView

人走茶凉 提交于 2020-01-17 05:27:24
问题 I have pretty complex custom ImageView and on the other hand I have Picture object that I want to draw it on the ImageView's canvas? Is this possible? The Picture object is not to be converted in any other type since then it'll lose quality and staff, that's why I go with Picture.. Thanks 回答1: You have at least 2 options: 1 - Retriev bitmap from ImageView. Create canvas from it: Canvas canvas = new Canvas(mImage); Draw on that canvas. 2 - Put transparent custom View/SurfaceView over ImageView

Android - Draw Picture over ImageView

不问归期 提交于 2020-01-17 05:26:13
问题 I have pretty complex custom ImageView and on the other hand I have Picture object that I want to draw it on the ImageView's canvas? Is this possible? The Picture object is not to be converted in any other type since then it'll lose quality and staff, that's why I go with Picture.. Thanks 回答1: You have at least 2 options: 1 - Retriev bitmap from ImageView. Create canvas from it: Canvas canvas = new Canvas(mImage); Draw on that canvas. 2 - Put transparent custom View/SurfaceView over ImageView

Issue when rendering a torus in webGL

青春壹個敷衍的年華 提交于 2020-01-17 04:57:31
问题 I'm writing a program that is supposed to draw 3D parametric shapes in webgl. The code I have currently seems to work (mostly) for a sphere, but when I switch out the equations used to find x, y, and z, for a torus, only the top half of the torus is being rendered (in the x-y plane). All of the parametric equations I have (for a sphere, a torus, and a cylinder) work when just the 2d canvas context is used without any webgl; however, when webgl is used, there seems to be a problem. In addition

Printing a panel to a printer

ⅰ亾dé卋堺 提交于 2020-01-17 04:51:19
问题 I am trying to print a panel (with its contents) to a printer. I saw different posts on the net, but I am not able to print the panel and get the correct size. The panel is getting printed very large and not as expected. For example, I want to print a panel and get as output size 80mm X 40mm: private void Print_Click(object sender, EventArgs e) { int pixelsWidth = 300; // 300 pixels= ~8cm int pixelsHeight = 150; // 150 pixels= ~4cm panelLabel.Size = new Size(pixelsWidth,pixelsHeight);