No hay forma de hacerlo utilizando el texto. Tendría que tener una imagen del texto y texture map la imagen 2-D en un 3-D surface. Por los gráficos por defecto se prestan en los ejes usando una proyección ortográfica, por lo que para crear perspectiva que tiene en su imagen de arriba tendría que o bien:
- artificialmente crearlo por la reducción de la longitud de un lado de la superficie sobre la que la imagen tiene un mapa de textura.
- Adjust the view projection of the axes.
Aquí hay algunos ejemplos de código para ilustrar lo anterior. Voy a empezar por la creación de una imagen de texto de muestra:
hFigure = figure('Color', 'w', ... %# Create a figure window
'MenuBar', 'none', ...
'ToolBar', 'none');
hText = uicontrol('Parent', hFigure, ... %# Create a text object
'Style', 'text', ...
'String', 'PHOTOSHOP', ...
'BackgroundColor', 'w', ...
'ForegroundColor', 'r', ...
'FontSize', 50, ...
'FontWeight', 'bold');
set([hText hFigure], 'Pos', get(hText, 'Extent')); %# Adjust the sizes of the
%# text and figure
imageData = getframe(hFigure); %# Save the figure as an image frame
delete(hFigure);
textImage = imageData.cdata; %# Get the RGB image of the text
Ahora que tenemos una imagen del texto que queremos, aquí es cómo se puede mapa de textura sobre una superficie 3-D y ajustar la proyección de vista:
surf([0 1; 0 1], [1 0; 1 0], [1 1; 0 0], ...
'FaceColor', 'texturemap', 'CData', textImage);
set(gca, 'Projection', 'perspective', 'CameraViewAngle', 45, ...
'CameraPosition', [0.5 -1 0.5], 'Visible', 'off');
y aquí está la imagen resultante:
Gracias, se fue yo estaba buscando –
wow, buena solución .... – ConfusinglyCuriousTheThird